Problem with DNS update script on 2.9.51

Hi, i am trying to connect to a PPTP server that does not have a static IP address so on my Mikrotik 2.9.27 router i have scheduled the following script:

:global vpn-interface-name "pptp-out" 
:global vpn-dns-name "dyndns.no-ip.biz" 
: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}

It works perfectly, i must admit, but when i tried to set the same thing on a 2.9.51 router it didn’t work.
Even though the scheduler runs the script (i can see that from the run count of the script list) the IP address is not being updated at all. I have had a lot of tries but still can’t make it work.

Is there any problem with the syntax or something else? :unamused: :unamused: :unamused:

Thanks in advance

Do you have primary and secondary DNS server specified in your MT?

From CLI can you resolve domains?

The DNS servers are set correctly and i have managed to resolve domains from command line successfuly. It’s not that :frowning:

It resolves on my 2.9.51 to 69.65.19.125.

Is this correct?

I’ve just used this script to connect to a Draytek 2910 using PPTP from a RB532 running 2.9.51

Works fine.

So it’s not your script :slight_smile:

Thanks, i will try to figure out what i going wrong.

Hi guys , i have got the same problem.

Just need to know more about this script , can you guys help me out here, we have a Draytek 2910 as a VPN pptp server and we connect the others branches using router boards 450 but wend the ip on the dns name change i lost connection, i just want to know more about this script , and how to apply in my router board.


Thanks alot


Daniel Abreu