This tutorial will walk you through the process of setting up Dynamic DNS with CloudFlare on the Ubiquiti EdgeRouter (or really any form of Linux). Please see here if you need to accomplish this using LibCloud, or here if you are using a supported provider.

The Steps

  1. First, we will need to install Python

    # Debian/Ubuntu/Vyatta/EdgeOS
    sudo apt-get install python
    # RedHat/CentOS/Fedora
    sudo yum install python

  2. Download this script to /config/scripts/

  3. Create a new file /config/scripts/, and paste this script. Add your own information directly below the # Edit here:

  4. 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. Note that no execution bit is required on the file.

    chmod +x /config/scripts/ &&
    ln -s /config/scripts/ /etc/dhcp3/dhclient-exit-hooks.d/

  5. Run the script in order to update DNS and verify that everything will work correctly