Friday, May 04, 2007

Dynamic DNS Setup In Ubuntu Using DynDNS

I use for dynamic domain services. There is easy setup and you can update your IP via a web browser, or schedule an application to run on a regular basis. Updating your IP address is important because you will lose your domain if you don’t update your record every 30-35 days. Here is a basic guide.

In Debian/Ubuntu you can install the updater via apt:

sudo apt-get install ipcheck

Create bin directory, dyndns directory and updater script:

mkdir ~/bin
mkdir ~/.dyndns
touch ~/bin/
chmod 700 ~/bin/
vi ~/bin/



cd ~/.dyndns
if [ -f ~/.dyndns/ipcheck.dat ]; then
/usr/sbin/ipcheck -r \
/usr/sbin/ipcheck --makedat -r \

Edit your crontab:

crontab -e

Add the following line to your crontab to run the script daily.

* 6 * * * /home/username/bin/


Anonymous said...

awesome! Thanks for a great post.

coives said...

Man... I did everything you said and my problem is cron will not execute that... It does go through the others commands and they run (I have tested) but this particular one will not.

It runs from the terminal but not from the crontab. I use Ubuntu 7.10. Any hel would be appreciated ;)

Patrick said...

cooives: I updated the script with the absolute path to ipcheck. Perhaps that will work better. I couldn't think of why you had issues with the cron until yesterday, when an absolute path issue prevented me from running a cron script.

lusitanv said...


I will test it today and I will give you some feedback :)

Anonymous said...

That works. Great article!