DDNS - Update multiple interface
Posted: Sun Dec 28, 2014 8:06 pm
Hi all experts,
I am facing some problem, and really appreciate if someone is able to help me.
I wanted to update FreeDNS (afraid.org) DDNS IP for my VPN client connections.
I have subscribed quite a few VPN, and they all connected in the Mikrotik for various testing and so on.
And I would like to use DDNS on each and every connection on them, for example:-
1) Connected Internet PPPoE = 1DDNS address
2) VPN1 (PPTP) = 1DDNS
3) VPN2 (PPTP) = 1DDNS
4) VPN3 (L2TP) = 1DDNS
5) and so on.
From what i found, I see only scripts that is able to update the 1st one which is the one i use to connect to the internet (PPPoE)
Is there any ways to update all the connected VPN via script, specifically for FreeDNS (afraid.org) and DynDNS.
Thank you very much in advance.
I do have some script below, which found in the forum/internet. I take no credit on these.
But I believe this script works like this.
Find the difference for my VPN connection, once found, update the IP. (But the IP it updates is from PPPoE and Not from the VPN itself.
I am facing some problem, and really appreciate if someone is able to help me.
I wanted to update FreeDNS (afraid.org) DDNS IP for my VPN client connections.
I have subscribed quite a few VPN, and they all connected in the Mikrotik for various testing and so on.
And I would like to use DDNS on each and every connection on them, for example:-
1) Connected Internet PPPoE = 1DDNS address
2) VPN1 (PPTP) = 1DDNS
3) VPN2 (PPTP) = 1DDNS
4) VPN3 (L2TP) = 1DDNS
5) and so on.
From what i found, I see only scripts that is able to update the 1st one which is the one i use to connect to the internet (PPPoE)
Is there any ways to update all the connected VPN via script, specifically for FreeDNS (afraid.org) and DynDNS.
Thank you very much in advance.
I do have some script below, which found in the forum/internet. I take no credit on these.
But I believe this script works like this.
Find the difference for my VPN connection, once found, update the IP. (But the IP it updates is from PPPoE and Not from the VPN itself.
Code: Select all
:global currentIP1;
:local newIP1 [/ip address get [find interface="pptp.vpn1"] address];
:if ($newIP1 != $currentIP1) \
do={ \
:log info "FreeDNS: IP changed, update required, Updating..."; \
#Update DNS on freedns.afraid.org
/tool fetch mode=http url="https://freedns.afraid.org/dynamic/update.php\?<random_freedns_string>=" keep-result=no host="freedns.afraid.org"
:log info "FreeDNS: FreeDNS IP updated to $newIP1 !"
:set currentIP1 $newIP1; \
} else={ \
:log info "FreeDNS: FreeDNS IP = current IP ($currentIP1), update not required."; \
}