You can connect virtual machines to gateway networks in your virtual data center so that the virtual machines have access to the Internet.

When you connect a virtual machine to a network, it is assigned an IP address from the network's predefined private IP address pool.


By default, gateways are deployed with firewall rules configured to deny all network traffic to and from the virtual machines on the gateway networks. Also, NAT is disabled by default so that gateways are unable to translate the IP addresses of the incoming and outgoing traffic. You must configure both firewall and NAT rules on a gateway for the virtual machines on a gateway network to be accessible. Attempting to ping a virtual machine on a network after configuring a NAT rule will fail without adding a firewall rule to allow the corresponding traffic.

Verify that you have network administrator privileges.


Locate the virtual machine to be connected.


If you are a virtual infrastructure administrator, click the virtual data center that contains the virtual machine and the Virtual Machines tab.


If you are a end user, in My Virtual Machines, select the virtual machine.


If the virtual machine is powered on, select it and click Power Off.


Click the virtual machine name.


Click the Networks tab.


If the virtual machine is not connect to a network, click Add a Network. Otherwise, click Edit Network Assignments.


Select a gateway network from the list of networks.


You can select more than one network to which to connect the virtual machine.


When selecting more than one network for the virtual machine, specify the virtual machines primary network by click the Primary NIC option for that network. By default, the primary network is set to the first network you selected for the virtual machine.


Click Save.


Create a NAT rule to translate the external network address and internal network address of the virtual machine so that it can receive network traffic from the Internet.

See Add a NAT Rule for the steps to create a NAT rule for the virtual machine.


Create a firewall rule to allow the gateway to send and receive Internet traffic for the virtual machine.

See Add a Firewall Rule for the steps to create a firewall rule allowing Internet access for the virtual machine.