Skip to content

Latest commit

 

History

History
41 lines (29 loc) · 950 Bytes

README.md

File metadata and controls

41 lines (29 loc) · 950 Bytes

cloudflare-dynamic-dns

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

How to use

Run commands

 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

Create an API token for the Cloudflare API

Create Token

Fill config

  • 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>"
}

Edit Crontab

#add to crontab
*/1 * * * * cd <script dir> && $(which node) update_ip.js