Alexander / Aebian

Who am I?

Musician, Programmer, Linux Geek and what not.  more...

The Categories


Arma CodeList
GitHub Projects
Media (Gallery)
Privacy Policy
My Hardware
My Wishlist

February 22nd at 4:30am
Report a website issue
For best viewing experience use a 4k screen.

nethavn Logo

❬ Back to Blog

DDNS with IPv6 address on Cloudflare using EdgeRouter

This post will cover the basic steps on how to update an IPv6 address leased from the ISP to Cloudflare domain

Hi folks,

For those of you who use EdgeRouters you probably notice that Ubiquiti introduced hasn't introduced a simple way to update an IPv6 address on cloudflare. With IP Version 4 this is rather simplier and works directly with the config.boot:

However with version 6 we need to get our hands dirty and work with crontab and a shell script. To do this, simple create a folder called utilities under /config/.
Next step create a file called under this folder and fill it with the following and edit your cloudflare credentials:

Make this script executable then with chmod +x
One last thing we need to do now is to run this script to automatically update the IP on cloudflare.
One easy way to do this is with a cronjob. Simple type sudo crontab -e -u root and add the following to it:

This will essentially run the script every minute to update the IP if there are any changes. I couldn't find a trigger that could be used instead.
You can check the results from the log-file located at /var/log/update-cloudflare-ddns.log.

That's it!

Over and Out,