- Timestamp:
- Apr 22, 2015 9:50:17 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 99702
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/doc/manual/en_US/user_Networking.xml
r55294 r55366 432 432 example command to create a NAT network is: 433 433 </para> 434 <para><screen>VBoxManage natnetwork add - t nat-int-network -n "192.168.15.0/24" -e</screen></para>434 <para><screen>VBoxManage natnetwork add --netname natnet1 --network "192.168.15.0/24" --enable</screen></para> 435 435 <para> 436 Here, "nat -int-network" is the name of the internal network to be used and436 Here, "natnet1" is the name of the internal network to be used and 437 437 "192.168.15.0/24" is the network address and mask of the NAT service 438 438 interface. By default in this static configuration the gateway will be … … 440 440 address), though this is subject to change. To attach a DHCP server to the 441 441 internal network, we modify the example as follows:</para> 442 <para><screen>VBoxManage natnetwork add - t nat-int-network -n "192.168.15.0/24" -e -hon</screen></para>442 <para><screen>VBoxManage natnetwork add --netname natnet1 --network "192.168.15.0/24" --enable --dhcp on</screen></para> 443 443 <para> or to add a DHCP server to the network after creation:</para> 444 <para><screen>VBoxManage natnetwork modify - t nat-int-network -hon</screen></para>444 <para><screen>VBoxManage natnetwork modify --netname natnet1 --dhcp on</screen></para> 445 445 <para>To disable it again, use:</para> 446 <para><screen>VBoxManage natnetwork modify - t nat-int-network -hoff</screen></para>446 <para><screen>VBoxManage natnetwork modify --netname natnet1 --dhcp off</screen></para> 447 447 <para>DHCP server provides list of registered nameservers, but doesn't map 448 448 servers from 127/8 network.</para> 449 449 <para>To start the NAT service, use the following command:</para> 450 <para><screen>VBoxManage natnetwork start - t nat-int-network</screen></para>450 <para><screen>VBoxManage natnetwork start --netname natnet1</screen></para> 451 451 <para>If the network has a DHCP server attached then it will start together 452 452 with the NAT network service.</para> 453 <para><screen>VBoxManage natnetwork stop - t nat-int-network</screen> stops453 <para><screen>VBoxManage natnetwork stop --netname natnet1</screen> stops 454 454 the NAT network service, together with DHCP server if any.</para> 455 455 <para>To delete the NAT network service use:</para> 456 <para><screen>VBoxManage natnetwork remove - t nat-int-network</screen></para>456 <para><screen>VBoxManage natnetwork remove --netname natnet1</screen></para> 457 457 <para>This command does not remove the DHCP server if one is enabled on the 458 458 internal network.</para> 459 <para>Port-forwarding is supported (using the "- p" switch for IPv4 and "-P"459 <para>Port-forwarding is supported (using the "--port-forward-4" switch for IPv4 and "--port-forward-6" 460 460 for IPv6):</para> 461 <para><screen>VBoxManage natnetwork modify - t nat-int-network -p "ssh:tcp:[]:10022:[192.168.15.15]:22"</screen></para>462 <para>This adds a port-forwarding rule from the host's TCP 10 022 port to463 the port 22 on the guest with IP address 192.168.15. 15. To delete the rule,464 use:</para>465 <para><screen>VBoxManage natnetwork modify - t nat-int-network -pdelete ssh</screen></para>461 <para><screen>VBoxManage natnetwork modify --netname natnet1 --port-forward-4 "ssh:tcp:[]:1022:[192.168.15.5]:22"</screen></para> 462 <para>This adds a port-forwarding rule from the host's TCP 1022 port to 463 the port 22 on the guest with IP address 192.168.15.5. Host port, guest port and guest IP 464 are mandatory. To delete the rule, use:</para> 465 <para><screen>VBoxManage natnetwork modify --netname natnet1 --port-forward-4 delete ssh</screen></para> 466 466 <para>It's possible to bind NAT service to specified interface:</para> 467 467 <screen>VBoxManage setextradata global "NAT/win-nat-test-0/SourceIp4" 192.168.1.185</screen>
Note:
See TracChangeset
for help on using the changeset viewer.