I have a couple of 951’s with dynamic WAN IPs that I’m trying to get hairpin nat working on without having to mess around with Split-DNS etc.
I’ve tried following various posts detailing how to configure the NAT rules for hairpin to work and its simply not working.
Almost all recent posts seem to follow this method - https://freek.ws/2016/11/21/mikrotik-hairpin-nat-with-dynamic-wan-ip-for-dummies/
Which for me does not work.
3 ;;; CCTV WAN NAT
chain=dstnat action=dst-nat to-addresses=10.10.5.230 to-ports=8000 protocol=tcp
in-interface=Ether1 - WAN dst-port=8000 log=no log-prefix=“”
I’m currently trying to get this to work on 2 different connections, both have dynamic WAN IP addresses, one of them dials the pppoe to ISP directly, the other is a double NAT setup behind an ISP router, I cant get either to work.
The first entry of CCTV and RDP (#2 + #4) is for the hairpin, the second rules (#3 + #5) are for access from WAN
and my address list config…
# LIST ADDRESS CREATION-TIME TIMEOUT
0 Dynamic IP MYROUTER.sn.mynetname.net feb/26/2017 21:22:06
1 D ;;; MYROUTER.sn.mynetname.net
Dynamic IP X.X.X.X feb/26/2017 21:50:20
If I reboot my modem, the ISP gives me a new WAN IP, and so far, after /ip cloud runs a DDNS update (every 60s), then the address list at some point updates itself with the new IP, but I dont know how often this is running. If I find it to be a problem, then I will just add a scheduled script with something like…
You probably don’t need two dstnat rules. Just one with dst-address-type=local (instead of in-interface=Ether1 - WAN) should be enough. The trick with address list should not be required either. You would need that only if this router did not have public address, but was behind another router with one, in that case, your config would be correct.
Hostnames in address list resolve based on TTL, which in case of *.sn.mynetname.net seems to be 1 minute.