Recently I have started using OpenDNS for my DNS needs, as well as their security tools for providing some simple protection for my home network. However, that also hit my with a problem that I still operate my home network based off a dynamic IP service from my ADSL provider. My Netgear router comes with a handy tool which can update a DynDNS (http://www.dyndns.com/) however I was struggling with a solution to keep my OpenDNS records updated with my current IP. This wouldn’t have of been a problem had I been using a PC or MAC (as OpenDNS have tools for that) – however all my clients are Linux, so I was stuck. I did find a part solution in that DNS-O-Matic (https://www.dnsomatic.com/) provides a free service for updating other DNS records, and provides a simple API. So a small script was hacked together to check and update the DNS-O-Matic records. #!/bin/bash USER=”Username” PASS=”Password” IP=$(curl -s http://myip.dnsomatic.com/ | egrep -m1 -o ‘; then echo “$OLDIP is currently up-to-date” exit 0 else echo $IP > /home/david/.dnsomatic.txt RETURN=$(curl -s https://${USER}:${PASS}@updates.dnsomatic.com/nic/update?) echo “Return message from DNS-O-Matic : ” $RETURN fi fi After that a small entry into the crontab to schedule the script to run several times a day – and again I am a happy man.
Search
-
European City Guide ScamFebruary 6th, 2010
-
Bulk creation of 2D Barcodes (QR Code, DataMatrix) in XMPieFebruary 5th, 2010
-
XMPie alone won’t save your businessApril 19th, 2013
-
My thoughts and advice on personal branding and privacyOctober 8th, 2012
-
Ok – So it looks like I am back for another year!July 16th, 2012
-
Jeroen van Druenen says:
-
Daniel Sheppard says:
Recent Tweets
-
@KellyHCB Enjoy your time off ;)
5 days ago -
@KellyHCB Woop Woop!
5 days ago -
@KellyHCB Hiya! You finished work yet? Suggest away ;)
5 days ago
