VMware

VMware Workstation 5.0

Features | Documentation | Knowledge Base | Discussion Forums

previous Prev   Contents   Last   Next next

Advanced NAT Configuration

Windows Host

Configure the NAT device using the virtual network editor (Edit > Virtual Network Settings > NAT).

Link to w_netwk_config_natmain.png

You can stop and start the virtual NAT device by clicking the appropriate buttons.

To edit NAT settings for a virtual network, choose it from the drop-down menu, then click Edit.

Link to w_netwk_config_natset.png

Change any NAT settings you wish. Click the appropriate button to set up or change port forwarding or to specify DNS servers the virtual NAT device should use.

Linux Host

Use the NAT configuration file on the host to configure the NAT device. This file is/etc/vmware/vmnet8/nat/nat.conf.

The configuration file is divided into sections. Each section configures a part of the NAT device. Text surrounded by square brackets — such as [host] — marks the beginning of a section. In each section is a configuration parameter that can be set. The configuration parameters take the form ip = 192.168.27.1/24.

For an example of a NAT configuration file, see Sample Linux vmnetnat.conf File. The configuration file variables are described below.

The [host] Section

ip
The IP address that the NAT device should use. It can optionally be followed by a slash and the number of bits in the subnet.

netmask
The subnet mask to use for the NAT network. DHCP addresses are allocated from this range of addresses.

configport
A port that can be used to access status information about the NAT device.

device
The VMnet device to use. Windows devices are of the form VMnet<x> where <x> is the number of the VMnet. Linux devices are of the form /dev/vmnet<x>.

activeFTP
Flag to indicate if active FTP is to be allowed. Active FTP allows incoming connections to be opened by the remote FTP server. Turning this off means that only passive mode FTP works. Set to 0 to turn it off.

The [udp] Section

timeout
Number of minutes to keep the UDP mapping for the NAT network.

The [dns] Section

This section is for Windows hosts only. Linux does not use this section.

policy
Policy to use for DNS forwarding. Accepted values include order, rotate, and burst.

  • order — send one DNS request at a time in order of the name servers
  • rotate — send one DNS request at a time and rotate through the DNS servers
  • burst — send to three servers and wait for the first one to respond
  • timeout
    Time in seconds before retrying a DNS request.

    retries
    Number of retries before the NAT device gives up on a DNS request.

    autodetect
    Flag to indicate if the NAT device should automatically detect the DNS servers available to the host.

    nameserver1
    IP address of a DNS server to use.

    nameserver2
    IP address of a DNS server to use.

    nameserver3
    IP address of a DNS server to use.

    If autodetect is on and some name servers are specified, the DNS servers specified in nameserver1, nameserver2 and nameserver3 are added before the list of detected DNS servers.

    The [netbios] Section

    This section applies to Windows hosts only. Linux does not use this section.

    nbnsTimeout = 2
    Timeout for NBNS queries.

    nbnsRetries = 3
    Number of retries for each NBNS query.

    nbdsTimeout = 3
    Timeout for NBDS queries.

    The [incomingtcp] Section

    This section is used to configure TCP port forwarding for NAT. In this section, you can assign a port number to an IP address and port number on a virtual machine.

    The following line shows the format used in this section.

    8887 = 192.168.27.128:21

    This example creates a mapping from port 8887 on the host to the IP address 192.168.27.128 and port 21. When this mapping is set and an external machine connects to the host at port 8887, the network packets are automatically forwarded to port 21 (the standard port for FTP) on the virtual machine with IP address 192.168.27.128.

    The [incomingudp] Section

    This section is used to configure UDP port forwarding for NAT. In this section, you can assign a port number to an IP address and port number on a virtual machine.

    The following line shows the format used in this section. It illustrates a way to forward X server traffic from the host port 6000 to the virtual machine's port 6001.

    6000 = 192.168.27.128:6001

    This example creates a mapping from port 6000 on the host to the IP address 192.168.27.128 and port 6001. When this mapping is set and an external machine connects to the host at port 6000, the network packets are automatically forwarded to port 6001 on the virtual machine with IP address 192.168.27.128.

    previous Prev   Contents   Last   Next next