1
24.1 Legacy Series / Hairpin NAT not working as expected
« on: April 26, 2024, 10:20:45 am »
Hello community,
My first post here and pretty new to OPNsense.
I've got a server in my LAN with a service listening on port 9091. I'm exposing this to the outside on another port: 19091.
I created a DNAT DNAT rule to allow traffic from WAN(&LAN) source any, source port any, destination WAN address port 19091, redirect target IP - private address, redirect target port 9091.
This works great from the outside, using a DNS entry that resolves to the Public IP of the WAN.
From LAN, using the same DNS entry and port 19091 I'm not able to connect.
I've been reading the documentation and understood that I also need a SNAT rule (https://docs.opnsense.org/manual/how-tos/nat_reflection.html)
I created the rule but for some reason it is not working. I'm unable to connect from LAN to "blabla.com" port 19091.
What am I missing here?
Later edit: nevermind, my SNAT rule was incorrect; issue fixed.
My first post here and pretty new to OPNsense.
I've got a server in my LAN with a service listening on port 9091. I'm exposing this to the outside on another port: 19091.
I created a DNAT DNAT rule to allow traffic from WAN(&LAN) source any, source port any, destination WAN address port 19091, redirect target IP - private address, redirect target port 9091.
This works great from the outside, using a DNS entry that resolves to the Public IP of the WAN.
From LAN, using the same DNS entry and port 19091 I'm not able to connect.
I've been reading the documentation and understood that I also need a SNAT rule (https://docs.opnsense.org/manual/how-tos/nat_reflection.html)
I created the rule but for some reason it is not working. I'm unable to connect from LAN to "blabla.com" port 19091.
What am I missing here?
Later edit: nevermind, my SNAT rule was incorrect; issue fixed.