DNS Notification With Inadyn

Using the Ubuntu Community pages (which are fantastic by the way) I setup Inadyn to update the IP for my DNS records. It was very simple because the community pages go through step by step. I might try to set up a mail server some day.

Install Inadyn using apt-get
sudo apt-get install inadyn
Then edit the config file so it knows the password and alias to update.
sudo vim /etc/inadyn.config
For some reason on my Gutsy install it didn’t create a config file so I created it.

The config file should be located in:
/etc/inadyn.config
and the content should look like this:

--username myusername
--password mypassword
--update_period 60000
--alias myhost.dyndns.org
--background

Change all “myusername”, “mypassword”, “myhost.dyndns.org” to your account and CName record. You can change the update_period but I left that to default.

You update multiple DNS names by inserting a new:
--alias myhost.dyndns.org
for every alias.

Save the config file and now and you can run inadyn manually with this command:
sudo /usr/sbin/inadyn
To automate the script you add a line in contrab. Open the contrab file
sudo crontab -e
add the following line to the end of the file:
@reboot /usr/sbin/inadyn
This will start inadyn on reboot and should update the IP according to the config.

Once you reboot, you can check if inadyn is running by typing this command:
ps -A | grep inadyn
A process called inadyn should be listed.

About Danny

I.T software professional always studying and applying the knowledge gained and one way of doing this is to blog. Danny also has participates in a part time project called Energy@Home [http://code.google.com/p/energyathome/] for monitoring energy usage on a premise. Dedicated to I.T since studying pure Information Technology since the age of 16, Danny Tsang working in the field that he has aimed for since leaving school. View all posts by Danny → This entry was posted in Linux. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *.

All comments must go through an approval and anti-spam process before appearing on the website. Please be patience and do not re-submit your comment if it does not appear.

This site uses Akismet to reduce spam. Learn how your comment data is processed.