This is a small script to change you IP dynamically in Cloudflare in case your internet provider assigns you a new IP adresse.
It supports IPv4 and IPv6
mkdir "cloudflare-dynamic-dns"
cd "cloudflare-dynamic-dns"
wget https://github.com/dev-steinbrecher/cloudflare-dynamic-dns/releases/latest/download/cloudflare-dynamic-dns.zip
unzip cloudflare-dynamic-dns.zip
rm cloudflare-dynamic-dns.zip
- Rename config.json.default to config.json
- Token should be your created API token from above
- Zone ID is the ID that you get from the Cloudflare domain overview in the right panel
{
"token": "<token>",
"zoneId": "<zoneId>"
}
#add to crontab
*/1 * * * * cd <script dir> && $(which node) update_ip.js