You can create a source NAT (SNAT) rule to change the source IP address from a public to private IP address or the reverse.

Procedure

  1. In the vSphere Web Client, navigate to Networking & Security > NSX Edges.
  2. Double-click an NSX Edge.
  3. Click the Manage tab, and then click the NAT tab.
  4. Click the Add (Add icon) icon and select Add SNAT Rule.
  5. Select the interface on which to add the rule.
  6. Select the required protocol.
  7. Type the original source (public) IP address in one of the following formats.

    Format

    Example

    IP address

    192.0.2.0

    IP address range

    192.0.2.0-192.0.2.24

    IP address/subnet

    192.0.2.0/24

    any

     
  8. Type the original source port or port range.

    Format

    Example

    Port number

    80

    Port range

    80-85

    any

     
  9. Type the destination IP address in one of the following formats.

    Format

    Example

    IP address

    192.0.2.0

    IP address range

    192.0.2.0 -192.0.2.24

    IP address/subnet

    192.0.2.0 /24

    any

     
  10. Type the destination port or port range.

    Format

    Example

    Port number

    80

    Port range

    80-85

    any

     
  11. Type the translated source IP address in one of the following formats.

    Format

    Example

    IP address

    192.0.2.0

    IP address range

    192.0.2.0-192.0.2.24

    IP address/subnet

    192.0.2.0/24

    any

     
  12. Type the translated port or port range.

    Format

    Example

    Port number

    80

    Port range

    80-85

    any

     
  13. Select Enabled to enable the rule.
  14. Click Enable logging to log the address translation.
  15. Click OK to add the rule.
  16. Click Publish Changes.