0

I am trying to achieve this.

https://wiki.mikrotik.com/wiki/Hairpin_NAT

WAP IP: static
LAN IP: 192.168.1.1
Web Server: 192.168.1.88

I can get to the web server from outside without any problem thanks to the port forwarding I set up. To access the web server from the internal network via the public IP or domain, I added this:

ip firewall nat add chain=srcnat src-address=192.168.1.0/24 dst-address=192.168.1.88 protocol=tcp dst-port=80  out-interface=bridge action=masquerade

When I try to access the web server from the internal network via the public IP or domain, I get to the router admin interface instead of the web server.

My questions are:

  1. What's wrong with the command for the hairpin nat? I believe that I followed the instruction. I am not exactly sure about out-interface, though.

  2. This issue gets me to think about how I can access the router admin interface if the hairpin nat works. There should be some way to distinguish the traffic to the web server and to the router itself.

-1

You should just disable/move to another port the RouterOS web-interface at IP - Services, as it uses port 80 and not letting your requests pass further.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.