Good day, gentlemen!
I have several web servers behind one external IP, all incoming traffic to ports 80 and 443 is sent to the reverse proxy server for SNI processing.
For access from the inside, I’m trying to configure the hairpin nat, but I’m at a dead end.
There’s nothing wrong with the config you posted. Does the last rule have any hits? If not, check forward chain in firewall filter and make sure that it’s not blocked by something in there.
Can I just say, Haproxy sounds like a pharmaceutical name for a new diabetes or high pressure drug.
Sob is a master at torturing rules so if he says your rules are okay, then they are.
Taking a page from Sob, (making a wild assed guess), I would say that your forward chain rule for allow destination nat is still in the stupid default format with the offending bit highlighted. add action=drop chain=forward comment=“defconf: drop all from WAN not DSTNATed”
connection-nat-state=!dstnat connection-state=new in-interface-list=WAN
Much better is the simpler: add action=accept chain=forward comment=“allow port forwarding” connection-nat-state=dstnat
Thanks for answer, for experiment I disable all firewall filtres and iptables rules (on proxy machine), without success
2anav
without changes(
log
TCP (SYN), 1.1.1.1(local PC ip):52625->192.168.110.232:443, NAT 1.1.1.1(local PC ip):52625->(1.X.X.X:443->192.168.110.232:443), len 52
TCP (SYN), 1.1.1.1(local PC ip):52626->1.X.X.X:443, len 52
The last line shows that haproxy doesn’t like the request, for some reason. Maybe it has some ACL preventing access from private subnets? You could either change that, or your hairpin NAT rule. If you have static public address, you can do action=src-nat to-addresses=1.X.X.X instead of action=masquerade, and all requests from LAN will look as if they come from 1.X.X.X.