Hi all, it seems it quite often problem with correct setup of hairpin nat.
I have domain name and Owncloud server in local network, so i setup port forwarding to get access to my Owncloud from internet it works fine, but i can’t access to it via Domain from LAN, it still accessible from local address, but i use some apps on mobile to get access to server and they can use only one type of address. So i want have access to server via Domain both from internet and local network.
I’ve tried different guides how to setup hairpin nat but still can’t make it work.
My setup
Local lan : 192.168.0.0/24 (local bridge - br1-lan)
Gateway : 192.168.0.1
WAN via PPPoE (IP 1.1.1.1) (out-interface = dom.ru-pppoe)
server: 192.168.0.5
Version Router OS : 6.36.3
last used setup is:
/ip firewall nat
add action=masquerade chain=srcnat out-interface=dom.ru-pppoe src-address=192.168.0.0/24
add action=masquerade chain=srcnat comment=“hairpin nat” dst-address=!192.168.0.1 src-address=192.168.0.0/24
add action=dst-nat chain=dstnat dst-address=!192.168.0.1 dst-address-type=local dst-port=80 protocol=tcp to-addresses=192.168.0.5 to-ports=80
add action=dst-nat chain=dstnat dst-address=!192.168.0.1 dst-address-type=local dst-port=433 protocol=tcp to-addresses=192.168.0.5 to-ports=433
add action=netmap chain=dstnat dst-address=1.1.1.1 dst-port=80 protocol=tcp to-addresses=192.168.0.5
add action=netmap chain=dstnat dst-address=1.1.1.1 dst-port=443 protocol=tcp to-addresses=192.168.0.5
Any help would be appreciated.
thank you in advance,