Hairpin NAT
Posted: Sat Nov 14, 2015 10:40 pm
Hello,
I am looking for help with setting harpin NAT.
This is my scenario:
I have www server behind NAT. I used nat port forwarding to forward 80 TCP port to inside lan address 192.168.1.250. (lan segment 192.168.1.0/24). On 192.168.1.250 I use nginx for domain managment.
Everythink works just fine but only from external networks like internet. So simply from net I can reach my websites normally.
My problem is:
I am unable to force my lan 192.168.1.0/24 to reach any www which I store on my server 192.168.1.250.
All my lan computers/devices use network 192.168.1.0/24.
I was looking for solution in net and I found that some guy suggest set "harpin NAT".
So I set somethink like below:
/ip firewall nat
add chain=srcnat src-address=192.168.1.0/24 dst-address=192.168.1.250 protocol=tcp
dst-port=80 out-interface=bridge-lan action=masquerade
I guess I didn't get point of setting this fueature because in result any website which I try to open are not working, I mean I see my nginx which work on 192.168.1.250 instead website which I am trying to open.
Could someone help me understand how to set harpin NAT properly ?
Thanks in advance for any help.
I am looking for help with setting harpin NAT.
This is my scenario:
I have www server behind NAT. I used nat port forwarding to forward 80 TCP port to inside lan address 192.168.1.250. (lan segment 192.168.1.0/24). On 192.168.1.250 I use nginx for domain managment.
Everythink works just fine but only from external networks like internet. So simply from net I can reach my websites normally.
My problem is:
I am unable to force my lan 192.168.1.0/24 to reach any www which I store on my server 192.168.1.250.
All my lan computers/devices use network 192.168.1.0/24.
I was looking for solution in net and I found that some guy suggest set "harpin NAT".
So I set somethink like below:
/ip firewall nat
add chain=srcnat src-address=192.168.1.0/24 dst-address=192.168.1.250 protocol=tcp
dst-port=80 out-interface=bridge-lan action=masquerade
I guess I didn't get point of setting this fueature because in result any website which I try to open are not working, I mean I see my nginx which work on 192.168.1.250 instead website which I am trying to open.
Could someone help me understand how to set harpin NAT properly ?
Thanks in advance for any help.