Dynamic IP update (to DNS service like zoneedit or dyndns) inside a local LAN or behind a router

#!/bin/sh
newip=`wget -o /dev/null -O - <a href="http://simple.showmyip.com" >http://simple.showmyip.com</a> | cut -f1 -d' ' | sed -n 1p`
presentip=`host myweb.com | sed -n 1p | cut -d' ' -f4`
if [ "$newip" != "$presentip" ]; then update_dns_ip.sh; fi

source

Leave a Reply