Skip to main content

Automatic Cloudflare DNS Update

Create a script that queries the current IP address, then updates it using Cloudflare's API

# Aquire the permanent, publically addressable ipv6 address of the eth0 adapter
ip -6 addr show dev eth0 mngtmpaddr | grep -oE "([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}"

# Aquire the ipv4 address
curl https://api.ipify.org

...