[nSLUG] Nova Scotia internet services

Jonathan Anderson jonathan.anderson at ieee.org
Wed Aug 15 14:48:01 ADT 2007


> I've never been a fan of running any type of service on dsl/cable
> service. [...] IP changes cause outages etc. [...] I wouldn't host
> anything I count on, like email.

I use Aliant DSL to host some websites. The IP address does change, but with 
dynamic DNS (e.g. zoneedit.com, which is free), I can easily update the 
address by pinging a web page.


--
#!/bin/sh

# update-zoneedit-record
#  by Jonathan Anderson
#
# Updates a single ZoneEdit dynamic DNS (DDNS) record

HOST=$1
UNAME=my_zoneedit_username
PASSWD=my_zoneedit_password

PAGE="https://dynamic.zoneedit.com/auth/dynamic.html?host=$HOST"
RESULT=`tempfile`
ERRORS=`tempfile`

OPTIONS="-O $RESULT"                         # output to $RESULT file
OPTIONS="$OPTIONS --no-check-certificate"    # SSL cert is for www.dnsvr.com
OPTIONS="$OPTIONS --http-user=$UNAME"        # ZoneEdit username
OPTIONS="$OPTIONS --http-passwd=$PASSWD"     # ZoneEdit password

wget -O - $OPTIONS $PAGE 2> $ERRORS

if [ "`grep -i success $RESULT`" == "" ]; then cat $RESULT; fi
if [ "`grep ERROR $ERRORS`" != "" ]; then cat $ERRORS; fi

rm $RESULT
rm $ERRORS
--


I run this script from cron every hour (once per site registered with 
ZoneEdit), but you could always do some "when my IP address changes" trickery 
(this was easier before they switched me from straight DHCP to PPPoE).



#!/jon
-- 
Jonathan Anderson

jonathan.anderson at ieee.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://nslug.ns.ca/mailman/private/nslug/attachments/20070815/d912b253/attachment-0002.pgp>


More information about the nSLUG mailing list