I've spent hours searching the web and read all the FreeBSD forum posts with "hairpinning" referenced. Even asked chatGPT for a how-to (none of the extensive suggestions worked). In most of the FreeBSD forum posts referenced going back for many years, SirDice has made comments about pf hairpinning, such as this one, "Connecting from the inside to the outside addresses is simply not going to work without some hairpin NAT trickery."
I'm seeking a description of that trickery. A how-to that works.
What I've tried: From the openbsd "PF - Traffic Redirection (Port Forwarding)", specifically:
Since that isn't in FreeBSD pf-speak, I asked chatGPT to convert it and got these:
They didn't work for me. Anyone have some freeBSD hairpinning pf rules that do?
I'm seeking a description of that trickery. A how-to that works.
What I've tried: From the openbsd "PF - Traffic Redirection (Port Forwarding)", specifically:
Code:
pass in on $int_if proto tcp from $int_net to egress port 80 rdr-to $server
pass out on $int_if proto tcp to $server port 80 received-on $int_if nat-to $int_if
Code:
rdr on $int_if proto tcp from $int_net to any port 80 -> $server
pass in on $int_if proto tcp from $int_net to $server port 80
and
nat on $int_if from $int_net to $server port 80 -> ($int_if)
pass out on $int_if proto tcp from $int_net to $server port 80