Create or Modify NAT Rules
Network Address Translation (NAT) maps
internal IP addresses on your compute network to addresses exposed on the public Internet.
To create a NAT rule, you provide the internal address and port number of a workload VM or
service and a public IP address and port number that you have obtained from the system.
- You must have obtained a public IP address for use by a VM in this SDDC. See Request or Release a Public IP Address.
- The VM must be connected to a compute network segment. You can create NAT rules for VMs whether they have static or dynamic (DHCP) addresses, but bear in mind that NAT rules for VMs using DHCP address assignment can be invalidated when the VM is assigned an internal address that no longer matches the one specified in the rule.
NAT rules on the SDDC network’s internet interface, since that's where your workload VMs'
public addresses are exposed. Firewall rules, which examine packet sources and
destinations, run on the
計算閘道
, and process traffic after it has been transformed by any
applicable NAT rules. When you create a NAT rule, you can specify whether a VM's
internal or external IP address and port number are exposed to firewall rules that
affect network traffic to and from that VM.
Inbound traffic to the SDDC's public IP address is always processed by the
NAT rules you create. Outbound traffic (reply packets from SDDC workload VMs) is
routed along the advertised routes and is processed by NAT rules when the
default route for your SDDC network goes through the SDDC's Internet interface.
But if the default route goes through a Direct Connect or VPN connection (for
example, if 0.0.0.0/0 is advertised through BGP or there is a policy-based VPN
with a remote network of 0.0.0.0/0), NAT rules run for inbound traffic but not
for outbound traffic, creating an asymmetric path that leaves the VM unreachable
at its public IP address. When the default route is advertised from the
on-premises environment, you must configure NAT rules on the on-premises
network, using the on-premises Internet connection and public IPs.
- Log in to theVMware Cloud on AWS GovCloudat https://www.vmc-us-gov.vmware.com/.
- Select.
- ClickADD NAT RULEand give the rule aName.
- Enter the NAT rule parameters.OptionDescriptionPublic IPChoose from the drop-down list of public IP address that have been provisioned for this SDDC. See Request or Release a Public IP Address.Service
- SelectAll Trafficto create a rule that applies to both inbound (DNAT) and outbound (SNAT) traffic to or from the specifiedInternal IP.
- Select one of the listed services to create an inbound (DNAT) rule that applies only to traffic using that protocol and port.Because services that use multiple destination ports cannot be subject to a NAT rule, they don’t appear on this list.
Public PortIf you specifiedServiceasAll Traffic, the default public port isAny.If you selected a particularService, then the rule applies to the assigned public port for that service.Internal IPEnter the internal IP address of the VM.Internal PortDisplays the internal port used by the selectedService. To use a custom port, Add a Custom Service, then select thatServicein the NAT rule.If you specifiedServiceasAll Traffic, the default internal port isAny.If you selected a particularService, then the rule applies to the assigned public port for that service.FirewallSpecify how traffic subject to this NAT rule is exposed to Compute Gateway firewall rules. By default, CGW firewall rules match the combination ofInternal IPandInternal Port. SelectMatch External Addressto have firewall rules match the combination ofExternal IPandExternal Port. (Distributed firewall rules never apply to external addresses or ports.)You can create multiple NAT rules that use the samePublic IPandInternal IPwithAll Traffic. If you do this, eachInternal IPuses thePublic IPfor outbound (SNAT) traffic, but only the first matching rule will be used for inbound (DNAT) traffic. The system creates (but does not display) a default outbound rule,. This rule is used for allInternal IPaddresses that do not match a specific NAT rule that applies toAll Traffic. The IP used for this rule is displayed I theDefault Compute Gatewaysummary on theNetworking & SecurityOverviewpage asSource NAT Public IP. - ToggleLoggingto log rule actions.
- The new rule is enabled by default. ToggleEnableto disable it.
- ClickSAVEto create the rule.The rule is created and itsStatusis reported asUp.