Hairpin NAT on Proxmox

mrboh

Member
Apr 23, 2017
4
0
6
45
Just wondering if anyone has come up with a working solution to hairpin NAT inside containers. My setup is PVE 6.2 with a single public IP and reverse proxy container handling HTTP/HTTPS access to various other containers (which are on a separate bridge, vmbr1, with each container having its own local IP). I've followed the PVE networking guide and all containers can access the internet using NAT but it is not possible to access containers via their public domain names from inside other containers. I've tried a number of solutions, including this one and adding SNAT lines to iptables but every time I get either a connection refused error message or a timeout. There is no connection entry in the reverse proxy log so I am sure this is a routing issue. Does anyone have an example of a working /etc/network/interface config they have used for this scenario?
 
Hi,

I would recommend you to set up a split DNS.
It is not recommended I case of complexity, performance, and security to use a hairpin NAT.