I am currently having an IPsec setup with 2 Mikrotiks routers.
In the peers menu, I've added the Cloud DNS name provided by Mikrotik (mynetname.net) as the address of the remote site.
Both sites have dynamic public IPs so I am using DNS names on both side.
The connection works fine but once in a while, I guess when one of the public changes, the tunnel drops.
A restart will do however I would like automate this part with a script.
But from what I've read and understand I am doing it wrong and I should rather set up the tunnel using temporary public IP as the remote address (in peers) and stop using the DNS name.
Then use scripts to check regularly for IP changes and update my tunnel accordingly.
Can someone confirm please?