Hi Mikrotik Forums!
I need help with NAT/Hairpin NAT.
/ip firewall nat
add action=masquerade chain=srcnat comment="main nat" dst-address=!192.168.2.1 out-interface-list=WAN src-address=192.168.2.0/24
add action=dst-nat chain=dstnat comment=PORT-FORWARD-80 protocol=tcp dst-port=80 dst-address=!192.168.0.0/16 dst-address-type=local in-interface=pppoe-out2 to-addresses=192.168.2.10
add action=dst-nat chain=dstnat comment=PORT-FORWARD-443 protocol=tcp dst-port=443 dst-address=!192.168.0.0/16 dst-address-type=local in-interface=pppoe-out2 to-addresses=192.168.2.10
I can access my external website from an external network. That works fine. I can also from internal, access the internet.
However,
add action=masquerade chain=srcnat comment=PORT-FORWARD-80-INTERNAL dst-address=192.168.2.10 dst-port=80 out-interface=bridge1 protocol=tcp src-address=192.168.0.0/16
add action=masquerade chain=srcnat comment=PORT-FORWARD-443-INTERNAL dst-address=192.168.2.10 dst-port=443 out-interface=bridge1 protocol=tcp src-address=192.168.0.0/16
From internal, I can't seem to access my external domain from internal. It just times out.
I believe this has something todo with my 2 WAN connections (pppoe-out1 and pppoe-out2). If I set the DNS on my domain to the IP of pppoe-out1, everything seems to work fine. If I set the DNS to the IP on pppoe-out2, it does not.
Thanks!