Everything is fine when accessed from outside on the WAN-address (DDNS). But being inside is not possible to refer to the service at the same address (DDNS). How can I make access to this service at the same address (DDNS), both inside and outside?
Now I added a static DNS:
/ip dns static add name <ddns-domain> address=192.168.88.200
It works, but only if I have one service - 192.168.88.200, but I still have a NAS (192.168.88.201), which also need to access port forwarding (inside and outside) at the same address (DDNS).
Customize everything as described in the article, but something does not want to work. Do not tell me what I’m doing wrong? These are the rules I have:
dst-address-type=local means “any IP of the Mikrotik itself”
This gets what you want - it’s a little broader than specifying dst-address=wan.ip.of.router, but that’s not a bad thing, especially if the wan IP is dynamic. Normally, with no hairpin support, you just specify dst-port and in-interface=ether1-gateway, but a hairpin connection would not be coming in on that interface… so using dst-address-type=local covers all your bases.
The other half of the magic is the second srcnat rule - which makes the server see the Mikrotik’s lan IP as the source whenever a connection is a hairpin access. This is important. If the actual inside host’s IP were shown to the server, then the server would just respond directly to the other client. The client will then see the reply from the server’s private IP when it tried to reach the server’s public IP, so it will drop the packets. This is what gets fixed by the second masquerade rule.