- Paste the source code that appears below. Edit the user, password, hostname and interface info to match your setup.
update noip ddns
:local noipuser username
:local noippass password
:local host noiphost
:local inetinterface ether1-gateway
:global previousIP
/tool fetch mode=http address="checkip.dyndns.org" src-path="/" dst-path="/dyndns.checkip.html"
:local result [/file get dyndns.checkip.html contents]
:local resultLen [:len $result]
:local startLoc [:find $result ": " -1]
:set startLoc ($startLoc + 2)
:local endLoc [:find $result "</body>" -1]
:local currentIP [:pick $result $startLoc $endLoc]
:local filename ("no-ip_ddns_update-" . $host . ".txt")
:if ([/interface get $inetinterface value-name=running]) do={
:if ($currentIP != $previousIP) do={
:set previousIP $currentIP
:local url "http://dynupdate.no-ip.com/nic/update\3Fmyip=$currentIP"
/tool fetch url=($url . "&hostname=$host") user=$noipuser password=$noippass mode=http dst-path=$filename
} else={
:log info "No-IP: Previous IP $previousIP is equal to current IP, no update needed"
}
} else={
:log info "No-IP: $inetinterface is not currently running, so therefore will not update."
}
Congratulations @dinh! You received a personal award!
Click here to view your Board
Congratulations @dinh! You received a personal award!
You can view your badges on your Steem Board and compare to others on the Steem Ranking
Vote for @Steemitboard as a witness to get one more award and increased upvotes!