VirtualBox

source: vbox/trunk/doc/manual/en_US/man_VBoxManage-natnetwork.xml

Last change on this file was 106061, checked in by vboxsync, 3 months ago

Copyright year updates by scm.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 14.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<!--
3 manpage, user manual, usage: VBoxManage natnetwork
4-->
5<!--
6 Copyright (C) 2006-2024 Oracle and/or its affiliates.
7
8 This file is part of VirtualBox base platform packages, as
9 available from https://www.virtualbox.org.
10
11 This program is free software; you can redistribute it and/or
12 modify it under the terms of the GNU General Public License
13 as published by the Free Software Foundation, in version 3 of the
14 License.
15
16 This program is distributed in the hope that it will be useful, but
17 WITHOUT ANY WARRANTY; without even the implied warranty of
18 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 General Public License for more details.
20
21 You should have received a copy of the GNU General Public License
22 along with this program; if not, see <https://www.gnu.org/licenses>.
23
24 SPDX-License-Identifier: GPL-3.0-only
25-->
26<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
27 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd"[
28<!ENTITY % all.entities SYSTEM "all-entities.ent">
29%all.entities;
30]>
31<refentry id="vboxmanage-natnetwork" lang="en">
32 <refentryinfo>
33 <pubdate>$Date: 2024-09-16 14:03:52 +0000 (Mon, 16 Sep 2024) $</pubdate>
34 <title>VBoxManage natnetwork</title>
35 </refentryinfo>
36
37 <refmeta>
38 <refentrytitle>VBoxManage-natnetwork</refentrytitle>
39 <manvolnum>1</manvolnum>
40 </refmeta>
41
42 <refnamediv>
43 <refname>VBoxManage-natnetwork</refname>
44 <refpurpose>create, modify, and manage a NAT network</refpurpose>
45 <refclass>&product-name;</refclass>
46 </refnamediv>
47
48 <refsynopsisdiv>
49 <cmdsynopsis id="synopsis-vboxmanage-natnetwork-add">
50<!-- The 'id' is mandatory and must start with 'synopsis-'. -->
51 <command>VBoxManage natnetwork add</command>
52 <group>
53 <arg choice="plain">--disable</arg>
54 <arg choice="plain">--enable</arg>
55 </group>
56 <arg choice="req">--netname=<replaceable>name</replaceable></arg>
57 <arg choice="req">--network=<replaceable>network</replaceable></arg>
58 <arg>--dhcp=on|off</arg>
59 <arg>--ipv6=on|off</arg>
60 <arg>--loopback-4=<replaceable>rule</replaceable></arg>
61 <arg>--loopback-6=<replaceable>rule</replaceable></arg>
62 <arg>--port-forward-4=<replaceable>rule</replaceable></arg>
63 <arg>--port-forward-6=<replaceable>rule</replaceable></arg>
64 </cmdsynopsis>
65
66 <cmdsynopsis id="synopsis-vboxmanage-natnetwork-list">
67 <command>VBoxManage natnetwork list</command>
68 <arg><replaceable>filter-pattern</replaceable></arg>
69 </cmdsynopsis>
70
71 <cmdsynopsis id="synopsis-vboxmanage-natnetwork-modify">
72 <command>VBoxManage natnetwork modify</command>
73 <arg>--dhcp=on|off</arg>
74 <group>
75 <arg choice="plain">--disable</arg>
76 <arg choice="plain">--enable</arg>
77 </group>
78 <arg choice="req">--netname=<replaceable>name</replaceable></arg>
79 <arg choice="req">--network=<replaceable>network</replaceable></arg>
80 <arg>--ipv6=on|off</arg>
81 <arg>--loopback-4=<replaceable>rule</replaceable></arg>
82 <arg>--loopback-6=<replaceable>rule</replaceable></arg>
83 <arg>--port-forward-4=<replaceable>rule</replaceable></arg>
84 <arg>--port-forward-6=<replaceable>rule</replaceable></arg>
85 </cmdsynopsis>
86
87 <cmdsynopsis id="synopsis-vboxmanage-natnetwork-remove">
88 <command>VBoxManage natnetwork remove</command>
89 <arg choice="req">--netname=<replaceable>name</replaceable></arg>
90 </cmdsynopsis>
91
92 <cmdsynopsis id="synopsis-vboxmanage-natnetwork-start">
93 <command>VBoxManage natnetwork start</command>
94 <arg choice="req">--netname=<replaceable>name</replaceable></arg>
95 </cmdsynopsis>
96
97 <cmdsynopsis id="synopsis-vboxmanage-natnetwork-stop">
98 <command>VBoxManage natnetwork stop</command>
99 <arg choice="req">--netname=<replaceable>name</replaceable></arg>
100 </cmdsynopsis>
101 </refsynopsisdiv>
102
103 <refsect1 id="vboxmanage-natnetwork-description">
104 <title>Description</title>
105 <para>
106 The <command>VBoxManage natnetwork</command> command enables you
107 to create, modify, and manage a NAT network.
108 </para>
109 <para>
110 NAT networks use the Network Address Translation (NAT) service.
111 The service groups systems into a network and prevents external
112 systems from directly accessing the systems in the network. The
113 service also enables the systems in the network to communicate
114 with each other and with external systems by means of TCP and UDP
115 over IPv4 and IPv6.
116 </para>
117 <para>
118 A NAT service is attached to an internal network. For a VM to use
119 the NAT service, you must attach the VM to the internal network.
120 Specify the name of the internal network when you create the NAT
121 service. Note that the internal network is created if it does not
122 already exist.
123 </para>
124 <refsect2 id="vboxmanage-natnetwork-add">
125 <title>Add a NAT Network Service</title>
126 <remark role="help-copy-synopsis"/>
127 <para>
128 The <command>VBoxManage natnetwork add</command> command creates
129 a new internal network interface and adds a NAT network
130 service. You must use this command before you can attach the VM
131 to the NAT network.
132 </para>
133 <variablelist>
134 <varlistentry>
135 <term><option>--disable</option></term>
136 <listitem><para>
137 Disables the NAT network service.
138 </para></listitem>
139 </varlistentry>
140 <varlistentry>
141 <term><option>--enable</option></term>
142 <listitem><para>
143 Enables the NAT network service.
144 </para></listitem>
145 </varlistentry>
146 <varlistentry>
147 <term><option>--netname=<replaceable>name</replaceable></option></term>
148 <listitem><para>
149 Specifies the name of the new internal network interface
150 on the host OS.
151 </para></listitem>
152 </varlistentry>
153 <varlistentry>
154 <term><option>--network</option></term>
155 <listitem><para>
156 Specifies the static or DHCP network address and mask of
157 the NAT service interface. By default, this value
158 specifies the static network address.
159 </para></listitem>
160 </varlistentry>
161 <varlistentry>
162 <term><option>--dhcp</option></term>
163 <listitem><para>
164 Enables or disables the DHCP server specified with
165 the <option>--netname</option> option.
166 </para></listitem>
167 </varlistentry>
168 <varlistentry>
169 <term><option>--ipv6</option></term>
170 <listitem><para>
171 Enables or disables IPv6. By default, IPv6 is disabled and
172 IPv4 is enabled.
173 </para></listitem>
174 </varlistentry>
175 <varlistentry>
176 <term><option>--loopback-4=<replaceable>rule</replaceable></option></term>
177 <listitem><para>
178 Enables an IPv4 loopback interface using the specified rule.
179 </para></listitem>
180 </varlistentry>
181 <varlistentry>
182 <term><option>--loopback-6=<replaceable>rule</replaceable></option></term>
183 <listitem><para>
184 Enables an IPv6 loopback interface using the specified rule.
185 </para></listitem>
186 </varlistentry>
187 <varlistentry>
188 <term><option>--port-forward-4=<replaceable>rule</replaceable></option></term>
189 <listitem><para>
190 Enables IPv4 port forwarding using the specified rule.
191 </para></listitem>
192 </varlistentry>
193 <varlistentry>
194 <term><option>--port-forward-6=<replaceable>rule</replaceable></option></term>
195 <listitem><para>
196 Enables IPv6 port forwarding using the specified rule.
197 </para></listitem>
198 </varlistentry>
199 </variablelist>
200 </refsect2>
201 <refsect2 id="vboxmanage-natnetwork-remove">
202 <title>Remove a NAT Network Service</title>
203 <remark role="help-copy-synopsis"/>
204 <para>
205 The <command>VBoxManage natnetwork remove</command> command
206 removes the specified NAT network service.
207 </para>
208 <variablelist>
209 <varlistentry>
210 <term><option>--netname=<replaceable>name</replaceable></option></term>
211 <listitem><para>
212 Specifies the name of the NAT network service to remove.
213 </para></listitem>
214 </varlistentry>
215 </variablelist>
216 </refsect2>
217 <refsect2 id="vboxmanage-natnetwork-start">
218 <title>Start a NAT Network Service</title>
219 <remark role="help-copy-synopsis"/>
220 <para>
221 The <command>VBoxManage natnetwork start</command> command
222 starts a NAT network service and any associated DHCP server.
223 </para>
224 <variablelist>
225 <varlistentry>
226 <term><option>--netname=<replaceable>name</replaceable></option></term>
227 <listitem><para>
228 Specifies the name of the NAT network service to start.
229 </para></listitem>
230 </varlistentry>
231 </variablelist>
232 </refsect2>
233 <refsect2 id="vboxmanage-natnetwork-stop">
234 <title>Stop a NAT Network Service</title>
235 <remark role="help-copy-synopsis"/>
236 <para>
237 The <command>VBoxManage natnetwork stop</command> command stops
238 a NAT network service and any associated DHCP server.
239 </para>
240 <variablelist>
241 <varlistentry>
242 <term><option>--netname=<replaceable>name</replaceable></option></term>
243 <listitem><para>
244 Specifies the name of the NAT network service to stop.
245 </para></listitem>
246 </varlistentry>
247 </variablelist>
248 </refsect2>
249 <refsect2 id="vboxmanage-natnetwork-list">
250 <title>List All NAT Network Services</title>
251 <remark role="help-copy-synopsis"/>
252 <para>
253 The <command>VBoxManage natnetwork list</command> command lists
254 all NAT network services. You can use a pattern to show a subset
255 of the NAT network services.
256 </para>
257 <variablelist>
258 <varlistentry>
259 <term><replaceable>filter-pattern</replaceable></term>
260 <listitem><para>
261 Specifies an optional filtering pattern.
262 </para></listitem>
263 </varlistentry>
264 </variablelist>
265 </refsect2>
266 <refsect2 id="vboxmanage-natnetwork-modify">
267 <title>Modify the Settings of a NAT Network Service</title>
268 <remark role="help-copy-synopsis"/>
269 <para>
270 The <command>VBoxManage natnetwork modify</command> command
271 modifies the settings of an existing internal network interface.
272 </para>
273 <variablelist>
274 <varlistentry>
275 <term><option>--disable</option></term>
276 <listitem><para>
277 Disables the NAT network service.
278 </para></listitem>
279 </varlistentry>
280 <varlistentry>
281 <term><option>--enable</option></term>
282 <listitem><para>
283 Enables the NAT network service.
284 </para></listitem>
285 </varlistentry>
286 <varlistentry>
287 <term><option>--netname=<replaceable>name</replaceable></option></term>
288 <listitem><para>
289 Specifies the name of the new internal network interface
290 on the host OS.
291 </para></listitem>
292 </varlistentry>
293 <varlistentry>
294 <term><option>--network</option></term>
295 <listitem><para>
296 Specifies the static or DHCP network address and mask of
297 the NAT service interface. By default, this value
298 specifies the static network address.
299 </para></listitem>
300 </varlistentry>
301 <varlistentry>
302 <term><option>--dhcp</option></term>
303 <listitem><para>
304 Enables or disables the DHCP server specified
305 with the <option>--netname</option> option.
306 </para></listitem>
307 </varlistentry>
308 <varlistentry>
309 <term><option>--ipv6</option></term>
310 <listitem><para>
311 Enables or disables IPv6. By default, IPv6 is disabled and
312 IPv4 is enabled.
313 </para></listitem>
314 </varlistentry>
315 <varlistentry>
316 <term><option>--loopback-4=<replaceable>rule</replaceable></option></term>
317 <listitem><para>
318 Enables an IPv4 loopback interface using the specified rule.
319 </para></listitem>
320 </varlistentry>
321 <varlistentry>
322 <term><option>--loopback-6=<replaceable>rule</replaceable></option></term>
323 <listitem><para>
324 Enables an IPv6 loopback interface using the specified rule.
325 </para></listitem>
326 </varlistentry>
327 <varlistentry>
328 <term><option>--port-forward-4=<replaceable>rule</replaceable></option></term>
329 <listitem><para>
330 Enables IPv4 port forwarding using the specified rule.
331 </para></listitem>
332 </varlistentry>
333 <varlistentry>
334 <term><option>--port-forward-6=<replaceable>rule</replaceable></option></term>
335 <listitem><para>
336 Enables IPv6 port forwarding using the specified rule.
337 </para></listitem>
338 </varlistentry>
339 </variablelist>
340 </refsect2>
341 </refsect1>
342
343 <refsect1 id="vboxmanage-natnetwork-examples">
344 <title>Examples</title>
345 <remark role="help-scope" condition="GLOBAL"/>
346 <para>
347 The following command shows how to create a NAT network for the
348 <literal>natnet1</literal> internal network that uses the
349 <literal>192.168.15.0/24</literal> network address and mask of the
350 NAT service interface. In this static configuration, the gateway
351 is assigned the <literal>192.168.15.1</literal> IP address by
352 default. Note that this IP address is the next address after the
353 network address that you specify with the
354 <option>--network</option> option.
355 </para>
356<screen>$ VBoxManage natnetwork add --netname natnet1 --network "192.168.15.0/24" --enable</screen>
357 <para>
358 The following command shows how to add a DHCP server to the
359 <literal>natnet1</literal> NAT network after creation:
360 </para>
361<screen>$ VBoxManage natnetwork modify --netname natnet1 --dhcp on</screen>
362 </refsect1>
363</refentry>
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette