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.