Hello,
I have setup in my rb750g a PPTP-Client to connect in my office via VPN.
In my office i have a draytek vigor 2820 with dyndns account.
In Dial Out → Connect To → i put my dyndns name for example “mydydns.ath.cx”
I saw this script in wiki, but this is for radius.
http://wiki.mikrotik.com/wiki/Manual:Scripting-examples#Resolve_host-name
What should i do for pptp-client?
Is this correct?
/system script add name="resolver" source= {
:local resolvedIP [:resolve "mydydns.ath.cx"];
:local pptpID [/interface pptp-client find comment="myPPTP"];
:local currentIP [/interface pptp-client get $pptpID connect-to];
:if ($resolvedIP != $currentIP) do={
/interface pptp-client set $pptpID connect-to=$resolvedIP;
/log info "dyndns ip updated";
}
}