For AI agents: the complete documentation index is available at https://docs.us.ovhcloud.com/en/llms.txt, the full documentation bundle is available at https://docs.us.ovhcloud.com/en/llms-full.txt, and this page is available as Markdown at https://docs.us.ovhcloud.com/en/hosted-private-cloud/vmware/nsx-configure-nat-redirection.md.
  • English

Configuring NAT for Port Redirections with NSX

View as Markdown

Learn how to configure NAT to create port redirections with NSX.

Requirements

Instructions

When you deploy your NSX solution, a SNAT rule is automatically created by OVHcloud, so you can go online from your segments.

We will add a redirection rule (DNAT) from the public virtual IP address on port 2222 in TCP to a virtual machine on LINUX on port 22 in TCP. In our example, we will use fictitious IP addresses.

In the NSX interface, go to the Networking tab.

  • Select NAT in the Network Services section.
  • Select ovh-T0-gw | Tier-0 to the right of Gateway.
  • Click ADD NAT RULE.

NAT configuration - NSX configure redirection - step 1

Fill in this information :

  • Name: enter to internal SSH
  • Action: Select DNAT.
  • Source IP: Enter the IP address or range of addresses that can use this redirection.
  • Destination IP: Public virtual IP address of NSX.
  • Destination PORT: Listening port on public address such as 2222.
  • Translated IP: IP address of the virtual machine being redirected to.

Then click on the three vertical dots to the right of Select Services. Select Create New.

NAT configuration - NSX configure redirection - step 2

 

Enter SSH22 under the Name column and click Set under the Service Entry column. Then click SAVE.

NAT configuration - NSX configure redirection - step 3

 

Click ADD SERVICE ENTRY.

NAT configuration - NSX configure redirection - step 4

Fill in these values :

  • Name : Enter SSH22.
  • Service Type : Select TCP.
  • Source Ports : Write the number 22.

Then click APPLY.

NAT configuration - NSX configure redirection - step 5

 

Click SAVE.

NAT configuration - NSX configure redirection - step 6

 

Click SAVE to confirm the creation of the redirection rule.

NAT configuration - NSX configure redirection - step 7

 

The rule is created and active.

NAT configuration - NSX configure redirection - step 8

Conclusion

Having read this guide, you should be able to configure NAT to create port redirections with NSX by adding a redirection rule.