Lets say that you have the local network 192.168.10.0/24
your mikrotik router 192.168.10.1 and your internet connection is PPPOE with dynamic IP address
you have DDNS name as (xyz.dyndns.org) or any other name.
you have NVR (192.168.10.100) on TCP port 9000
in normal configuration you will have the following entry on the NAT:
1- chain=srcnat action=masquerade out-interface=pppoe-out log=no log-prefix=""
2- chain=dstnat action=dst-nat to-addresses=192.168.10.100 to-ports=9000 protocol=tcp in-interface=pppoe-out dst-port=9000 log=no log-prefix=""
with this configuration you can access your server from outside with the address ( xyz.dyndns.org:9000 )
but from inside you will need to use the address ( 192.168.10.100:9000 )
its too noisy to have two configuration on your devices for each service you have.
i find many Hairpin NAT configuration online but its all work with normal interface (dynamic or static address) or with PPPOE but with static address
but nothings working with PPPOE with dynamic address.
finally i find this code solving the problem:
1- chain=srcnat action=masquerade out-interface=pppoe-out log=no log-prefix=""
2- chain=srcnat action=masquerade src-address=192.168.10.0/24 dst-address=192.168.10.0/24 log=no log-prefix=""
3- chain=dstnat action=dst-nat to-addresses=192.168.10.100 to-ports=9000 protocol=tcp dst-address-type=local dst-port=9000 log=no log-prefix=""