I have my domain name registered at OVH. To update a DNS address from a machine behind a dynamic IP, they provide a feature called DynHost. DynHost uses the same protocol as DynDNS for updating their website.
From your DNS Section of the OVH manager webapp, you can create a DynHost account: you will have to specify the DNS address you want to update, a username and password for this account.
Warning: The script that update your DynHost address sends your login and password uncrypted! Don’t use the same login/password as your main OVH Manager account.
Once created, you can configure your home server to update your DynHost.
Updatedd is an utility recommended by OVH to update your address from Linux. You can find it here.
Get the sources:
Then, you will have to fix an error in a configuration file before compile it. Extract and edit the libovh file:
And replace the host ovh.com on line 24 by www.ovh.com. You should have:
We can now compile updatedd:
1 2 3
You can now use updatedd to update your domain name with the command:
Automate the DynHost Update
To update your account, create a script and run it on a daily base with cron.
Create a Script with this content:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
Don’t forget to change DynHost parameters with yours in the script.
Make the script executable and put both updatedd and your script in a folder in your path. For instance:
Finally, put into your cron so that it is executed on a daily base (here every 30 minutes):
The steps and scripts described here have been adapted from this article. This steps should work for any provider supporting DynDNS protocol.