Created
August 13, 2015 04:38
-
-
Save yohangdev/39a63559f3d5cef0d472 to your computer and use it in GitHub Desktop.
Mikrotik Script Update Dynamic DDNS / NO-IP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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