I am having an issue with a DynDNS hostname not resolving when using a PPTP VPN.
I am able to ping the host name from this same MikroTik, and it resolves the host name correctly. I can also VPN from my own machine into the MikroTik using the DynDNS host name, however only the PPTP client refuses to resolve the host name.
I have tested various things like, deleting and recreating the DynDNS account, changing sides so the instead of “MikroTik-1” connecting to “MikroTik-2”, “MikroTik-2” would connect to “MikroTik-1”.
It makes no sense to me as I can connect from my Windows machine, but the MikroTik routers are refusing to resolve the host name. I have tested changing IP → DNS. I have also tested changing the DNS under the ppp → profile. It has not made a change. When using the current public IP address, it works but now I have to check daily to make sure the PPTP account is active and if not, update the public IP again.
The setup is basically, each side has a LTE router connected and all traffic routes through the gateways. Ports are forwarded correctly and like I mentioned, I can connect to the VPN from Windows to MikroTik, but not from MikroTik to MikroTik.
Still no luck on finding a solution. I did notice on some of the other Mikrotiks, they do exactly the same thing however, after various attempts (about half an hour), it suddenly resolves and connects. This one does not. I have had the dynDNS VPN trying to connect over the weekend and it was unable to resolve the hostname. Luckily, the IP has not yet rotated.
I have tried the script as set out here: http://forum.mikrotik.com/t/resolve-dyndns-name-at-pptp-client-solved/45592/1 but it does not work.
I do not know what else to try.
Script there is as below:
/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";
}
}
I dont know what else I can try. Maybe I am using the above script wrong?
I added a comment to the PPTP client to be 'myPPTP" as per script and edited the DynDNS address to be the one in question.
before creating a schedule, I ran the script to see if it would update the PPTP client but it did not. 