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

Procedure

  1. Log in to the vSphere Web Client.
  2. Click Networking & Security and then click NSX Edges.
  3. Double-click an NSX Edge.
  4. Click the Manage tab, and then click the NAT tab.
  5. Click the Add (Add icon) icon and select Add DNAT Rule.
  6. Select the interface on which to apply the DNAT rule.
  7. Select the required protocol.
  8. Type the 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

     
  9. Type the source port or port range.

    Format

    Example

    Port number

    80

    Port range

    80-85

    any

     
  10. Type the original (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

     
  11. Type the original port or port range.

    Format

    Example

    Port number

    80

    Port range

    80-85

    any

     
  12. Type the translated 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

     
  13. Type the translated port or port range.

    Format

    Example

    Port number

    80

    Port range

    80-85

    any

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