VirtualBox

Changeset 55366 in vbox for trunk/doc


Ignore:
Timestamp:
Apr 22, 2015 9:50:17 AM (10 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
99702
Message:

doc/manual: some improvements for documenting NAT network commands with VBoxManage

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/manual/en_US/user_Networking.xml

    r55294 r55366  
    432432    example command to create a NAT network is:
    433433    </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>
    435435    <para>
    436     Here, "nat-int-network" is the name of the internal network to be used and
     436    Here, "natnet1" is the name of the internal network to be used and
    437437    "192.168.15.0/24" is the network address and mask of the NAT service
    438438    interface.  By default in this static configuration the gateway will be
     
    440440    address), though this is subject to change.  To attach a DHCP server to the
    441441    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 -h on</screen></para>
     442    <para><screen>VBoxManage natnetwork add --netname natnet1 --network "192.168.15.0/24" --enable --dhcp on</screen></para>
    443443    <para> or to add a DHCP server to the network after creation:</para>
    444     <para><screen>VBoxManage natnetwork modify -t nat-int-network -h on</screen></para>
     444    <para><screen>VBoxManage natnetwork modify --netname natnet1 --dhcp on</screen></para>
    445445    <para>To disable it again, use:</para>
    446     <para><screen>VBoxManage natnetwork modify -t nat-int-network -h off</screen></para>
     446    <para><screen>VBoxManage natnetwork modify --netname natnet1 --dhcp off</screen></para>
    447447    <para>DHCP server provides list of registered nameservers, but doesn't map
    448448    servers from 127/8 network.</para>
    449449    <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>
    451451    <para>If the network has a DHCP server attached then it will start together
    452452    with the NAT network service.</para>
    453     <para><screen>VBoxManage natnetwork stop -t nat-int-network</screen> stops
     453    <para><screen>VBoxManage natnetwork stop --netname natnet1</screen> stops
    454454    the NAT network service, together with DHCP server if any.</para>
    455455    <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>
    457457    <para>This command does not remove the DHCP server if one is enabled on the
    458458    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"
    460460    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 10022 port to
    463     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 -p delete 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>
    466466    <para>It's possible to bind NAT service to specified interface:</para>
    467467    <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.

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