Skip to content

peterbudai/he-dns-update

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Hurricane Electric dynamic DNS updater

This is a small Bash utility script that can be used to update your dynamic DNS entries if you use the Free DNS service from Hurricane Electric.

It tries to remain minimal in terms of prerequisites to make it usable on various modern Linux distributions.

Quick start guide

Step 1. Download the source code of the latest release.

Step 2. Unzip it.

tar xzf he-dns-update-<version>.tar.gz

Step 3. Edit the provided example configuration file (dns-update.conf) and fill it with your hostnames and dynamic DNS entry keys.

Step 4. Run the utility.

./dns-update.sh

Using Git

Alternatively, you can clone this repository directly via Git to obtain the latest version. So, instead of Step 1 and 2 above, run the following command.

git clone git@github.com:peterbudai/he-dns-update.git

Configuration

The configuration file should always be placed next to the script. It should bear the same file name, except the .conf extension. It has a very straightforward simple tabular format:

  • Everything starting with a pound sign (#) is considered as comment and discarded.
  • Each line describes a single dynamic DNS entry that you set up at HE.
  • Each entry consists of 3 columns, separated with any number and kind of whitespace:
    1. IP protocol version: 4 (for A records) or 6 (for AAAA records).
    2. The fully qualified hostname of the entry, eg. test.example.org
    3. The key for the dynamic DNS entry. I suggest generating one using the HE web form, it is usually a sequence of 16 alphanumeric characters, eg. AbCd1234EfGh5678.

Running

Manually

You can always run the script manually, which will immediately try to update all DNS records specified in the config file.

./dns-update.sh

You can use this option to test your configuration. To get more feedback in case of an error, specify the -v or --verbose flag when running.

./dns-update.sh -v

Automatically

I suggest adding this script to your crontab. This way it will be run at regular intervals and will always keep your IP address up to date.

An example cron configuration that runs the update every 15 minutes would look like the following (in this case the script and the config file is copied to the /etc/cron.d directory).

*/15 * * * *    root    /etc/cron.d/dns-update

Alternatively, you can set up any kind of network interface hooks that will trigger running the DNS update. This is more advanced and depends heavily on the Linus distribution you use.

License

This utility is distributed under the MIT License.

Contributing

Feel free to file an issue or open a pull request.

Acknowledgement

Inspired by this Gist from joe miller.

About

Dynamic DNS record update utility for Hurricane Electric Free DNS service.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages