VMware NSX

 View Only

NSX-T Hairpin NAT Destination Filtering

  • 1.  NSX-T Hairpin NAT Destination Filtering

    Posted Mar 26, 2023 10:27 AM
      |   view attached

    We want to use NSX-T for hairpin routing but we require it to be done based on the packets destination.

    We have the following scenario:



    We would like the traffic going out of VM1 to be NAT-ed based on the network it is going to (SHARED/INTERNET) when the traffic is going to shared ( we would like it to exit with the shared IP as source and when the traffic is going to public we would like it to exit with the public IP as source.

    This all works well when going out of the NSX-T T0 and the NAT is applied to the interfaces. But there is a problem when we want to do hairpin routing.

    Lets say the VM1 wants to exit the network (SNAT) with public IP and shared IP and VM2 has shared IP (DNAT). When we create the NAT entries and assign them to the interfaces the traffic going out and into the T0 works fine but if we want to reach VM2 with its shared IP NSX-T simply does not do the NAT.

    We wanted to solve the issue by not assigning DNAT and SNAT entries to interfaces but then we have the problem of not being able to filter the traffic in the SNAT destination because it does not filter based on the initial packet, but rather based on the DNAT-ed packet.

    Please find the example NAT configuration attached.

    How can our issue be resolved using hairpin NAT? Is the functionality even supported?

    NSX-T version:

    Thank you for your support.



    nsxt-vmware-example.txt   2 KB 1 version