I’ve never played around with OVPN so I’m not sure about the specifics, especially in Mikrotik routers, but in general, I would say that you could probably roll a solution with a script (grrr - scheduled scripts are against my religion in most cases, but yours seems to be one of those necessary ones)
As long as you’re using a type of VPN where one side can accept “road warrior” connections, you could then set the “client” router up with a script that performs a :resolve on the dyndns name of the “host” router, and whenever the IP is different than the one configured on the vpn client, set the new address on the vpn client configuration. Schedule this script to run at whatever interval the TTL for the dyndns hostname is, and you should be set.
Thanks ZeroByte, but my question is about the P2P OpenVPN mode in Mikrotik.
I know that there is no problem to use dns hostnames in destination address in OpenVPN, I already have OpenVPN configured in Mikrotik as server-client mode. I want to know if it possible to use the P2P mode.
Best regards.