Skip to content

Instantly share code, notes, and snippets.

@yohangdev
Created August 13, 2015 04:38
Show Gist options
  • Save yohangdev/39a63559f3d5cef0d472 to your computer and use it in GitHub Desktop.
Save yohangdev/39a63559f3d5cef0d472 to your computer and use it in GitHub Desktop.
Mikrotik Script Update Dynamic DDNS / NO-IP
# How To: http://wiki.mikrotik.com/wiki/Dynamic_DNS_Update_Script_for_No-IP_DNS
:log info "START IP Dynamic DNS"
:local NOIPUser "your_email"
:local NOIPPass "your_password"
:local NOIPDomain "your_host_domain"
:log info "Get Public IP Address..."
/tool fetch url="http://myip.dnsomatic.com/mypublicip.txt" mode=http
:local externalIP [/file get mypublicip.txt contents]
:log info "IP External: $externalIP"
:log info "Updating $NOIPDomain"
/tool fetch mode=http user=$NOIPUser password=$NOIPPass url="http://dynupdate.no-ip.com/nic/update\3Fhostname=$NOIPDomain&myip=$externalIP" keep-result=no
:log info "NO-IP Updated: $NOIPDomain - $externalIP"
:log info "END IP Dynamic DNS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment