Community discussions

MikroTik App
User avatar
just joined
Topic Author
Posts: 10
Joined: Mon Apr 11, 2016 4:30 pm

DDNS Update Script

Wed Apr 18, 2018 11:02 am

Hello guys, I've just made a DDNS update script for my several incoming dynamic IP internet connection (via PPPoE). Thought i'd share with you all.
/system script add name="noip-update" source="
:global noipUpdateProfile {

:global noipUpdate do={
  :local url ("\3Fmyip=" . $address . "&hostname=" . $hostname);
  :log info ("noip-update: " . $hostname . " => " . $address)
  /tool fetch url=$url user=$username password=$password mode=http keep-result=no

:global noipUpdateProfilePPP do={
  :global noipUpdate
  :local interfaceName [/interface get $interface name]
  $noipUpdate username=($profile->"username") password=($profile->"password") hostname=($profile->$interfaceName) address=$address
Then I would add a new PPP Profile, and set my PPPoE interface to use it. I set it to trigger on up, so it'll report to NOIP of the new interface's IP address for updating:
/ppp profile add name=noip-update on-up="
:global noipUpdateProfilePPP
:global noipUpdateProfile

:if ([ :typeof $noipUpdateProfilePPP ] = "nothing") do={
  /system script run noip-update;
:local address $"local-address"
$noipUpdateProfilePPP profile=$noipUpdateProfile interface=$interface address=$address
I'd love to know what you think. Hope that this benefits you all.

Who is online

Users browsing this forum: Baidu [Spider] and 23 guests