Hello ,
I’m new to mikrotik devices, I’m using hap ac. So I’m have this:
pppoe connection is setup on router and my provide also provide me DNS .
192.168.0.1 router ip
192.168.0.5 nas with openvpn
I just Wana access from internet the openvpn server. I figured out i made on firewall nat rule . here it’s the problem , on nat rule at dst. address I put my DNS , was transformed to public IP. if my power goes down my IP change , but on nat rule no because read the IP not the DNS . how can I make this? . I just Wana something auto, to assing my public IP on that nat rule everytime when my power goes down.
can explain me how to make harpip ? i just set the pppoe connection , but when i just wana access my external ip from local network all the time shows me the router page. on my phone on public ip redirects to my site,its fine.
It’s because connections from LAN of course have LAN as incoming interface and it won’t match in-interface=. But you need to match destination somehow. You can’t easily use IP address if it’s dynamic. But you can use dst-address-type=local, which matches any address assigned to router. Next problem can be that it matches all local addresses. It doesn’t matter for some “exotic” ports, but if it would be e.g. port 80, which you’d want to forward to internal server, but at the same time you’d like to have WebFig also on port 80, that would not be accessible, because dstnat would forward all connections to internal server. The way around that is to exclude router’s internal address from dstnat rule.