Using a dns name for pptp server

Is there anyway to force a pptp client to user a FQDN for its pptp server rather than resolving the name when you first put it in?

I have a friend who has his pptp connection setup to use a static address on my home connection, but I also have a secondary home connection which is faster but with a dynamic IP. I then have dyndns setup on this so the name will always link to the current IP, but am unable to link him to this because of the name being resolved when first entered into the Mikrotik field.

you will need to run some script with :resolve command that will update your rules to correct IP address

for V2.9
-----------------------------------------
:global "vpn-interface-name" "pptp-user"
:global "vpn-dns-name" "your_dynamic_address"
:global "new-vpn-ip" [:resolve "$vpn-dns-name"]
:global "current-vpn-ip" [/interface pptp-client get "$vpn-interface-name" connect-to]
:if ("$current-vpn-ip" != "$new-vpn-ip") do={ /interface pptp-client set [find name="$vpn-interface-name"] connect-to="$new-vpn-ip"}
---------------------------------------


for V3.11
---------------------------------------
:global "vpn-interface-name" "pptp-user"
:global "vpn-dns-name" "your_dynamic_address"
:global "new-vpn-ip" [:resolve $"vpn-dns-name"]
:global "current-vpn-ip" [/interface pptp-client get $"vpn-interface-name" connect-to]
:if ($"current-vpn-ip" != $"new-vpn-ip") do={ /interface pptp-client set [find name=$"vpn-interface-name"] connect-to=$"new-vpn-ip"}
--------------------------------------

Sweet, thanks for the script hilton.

it’s a pleasure.