This tutorial is aimed for users with a dynamic IP, and a DNS host that does not support DynDNS. Basically, we will push our new IP every time that it changes. The steps outlined in this tutorial will work with the providers listed in Apache’s documentation, but I have only actually tested with Rackspace.
- First, we will need to install Python and its package manager
# Debian/Ubuntu/Vyatta/EdgeOS sudo apt-get install python python-setuptools # RedHat/CentOS/Fedora sudo yum install python python-setuptools
- Now we install Apache’s Libcloud so that we may easily manipulate the remote DNS APIs
sudo easy_install apache-libcloud
- Create this script in
/config/scripts/dyndns.py. Modify the values between
# Edit Hereand
# Stop Editingsections.
- Add execution bit and create a hard link in dhclient exit hooks directory. These two commands will need to be rerun if you flash the ERL firmware.
chmod +x /config/scripts/dyndns.py && ln -s /config/scripts/dyndns.py /etc/dhcp3/dhclient-exit-hooks.d/dyndns
- Run the script in order to update DNS and verify that everything will work correctly