Contents

Previous Next

Advanced NAT Configuration
Read the section that corresponds to your host operating system for information on configuring NAT for your virtual machines.
Windows Hosts
Configure the NAT device using the Virtual Network Editor (Host > Virtual Network Settings > NAT).
Link to w_net_ed_nat.png
You can stop, restart and start the virtual NAT device by clicking the appropriate button. The VMnet host setting lets you choose which virtual network uses the NAT device. You can select Disable if you do not want to use NAT on any virtual network.
To edit NAT settings for a virtual network, choose it from the drop-down menu, then click Edit. The NAT Settings dialog box appears.
Link to w_net_ed_natset_gsx.png
You can change any of the following NAT settings:
  • Port forwarding lets you send incoming TCP or UDP requests to a specific virtual machine on the virtual network served by the NAT device. To set up and configure forwarded ports, click Port forwarding. A dialog box appears.
  • To add a new port for either TCP or UDP, click Add. If a port is already listed, you can change its settings. Select its name in the list, then click Properties. Or click Remove to remove the selected port.
    When you click Add, another dialog box appears. In the Host port field, type the number of the incoming TCP or UDP port. For example, incoming HTTP requests are usually on port 80. In the first Forwarding IP address field, type the IP address of the virtual machine to which you want to forward the incoming requests. In the second field on that line, type the port number you want to use for those requests on that virtual machine. This may be the standard port, such as 80 for HTTP, or a nonstandard port if software running in the virtual machine is configured to accept requests on a nonstandard port. The Description field is optional. You may use it to identify the service being forwarded (for example, HTTP). When you have made these settings, click OK.
  • You may specify DNS servers to be used by the virtual NAT device. To do so, click DNS. A dialog box appears. You can change the Policy for using multiple DNS servers if you prefer to use Rotate or Burst instead of the default setting of Order. To add a DNS server to the list, click Add. Another dialog box appears. Enter the DNS server's IP address in the IP address field. The Description field is optional. When you have made the desired settings, click OK.To change the settings for a server already in the list, select its entry in the DNS dialog box, then click Properties. To delete an entry, select the entry, then click Remove. When you have made the desired changes, click OK.
  • You can change the IP address for the NAT device in the Gateway IP address field. If you need to change the Netmask, click the ... button on the Host Virtual Network Mapping tab of the Virtual Network Editor and choose Subnet.
  • If you want to allow only passive mode FTP over the NAT device, deselect the Active FTP check box.
  • You can change the number of minutes to keep the UDP mapping for the NAT in the UDP timeout field.
  • If you change the OUI (Organizationally Unique Identifier) portion of the MAC address for the virtual machine and subsequently cannot use NAT with the virtual machine, you should check the Allow Any OUI check box.
  • In the Config port field, you can specify a port that can be used to access status information about the NAT. This option is used for troubleshooting purposes with VMware technical support only.
  • You can change NetBIOS timeout and retry settings.
  • When you have made all the networking changes you want, click OK.
    Linux Hosts
    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. DHCP addresses are allocated from this range of addresses.
    configport
    A port that can be used to access status information about the NAT.
    device
    The VMnet device to use. Linux devices are of the format /dev/vmnet<x>. VMnet8 is the default NAT device.
    activeFTP
    A flag that indicates 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 the flag to 0 to turn active FTP off.
    The [udp] Section
    timeout
    The number of minutes to keep the UDP mapping for the NAT.
    The [incomingtcp] Section
    Use this section to configure TCP port forwarding for NAT. 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
    Use this section to configure UDP port forwarding for NAT. 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 Next