Skip to content

This script allows to update ipv4/ipv6 dns on cloudflare also for free domains (.tk .ml .ga .cf .gq) that normally could not because the api is blocked.

License

Notifications You must be signed in to change notification settings

LukeAz/cloudflare-dynamic-dns-updater

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudflare

cloudflare-dynamic-dns-updater

This script allows to update ipv4/ipv6 dns on cloudflare also for free domains (.tk .ml .ga .cf .gq) that normally could not because the api is blocked.
The dns value will be updated only in case it is different.

Technologies

Project includes:

  • Python
  • Selenium webdriver
  • Request

Requirements

Edit and configure config.json

  • auth_email : account email
  • auth_password : account password
  • auth_key : see below
  • zone_identifier: see below
  • zone_name: your domain, example: domain.it
  • record_name: your subdomain, example: subdomain.domain.it
  • proxy: do you want to use cloudflare proxy?
  • ttl: if you use the proxy leave the default value
  • type: "AAAA" for ipv6, "A" for ipv4

[Auth Key]

  • Go in your profile in your dashboard
  • Select “API Tokens”
  • Create a new token api
  • Select “Edit zone DNS” templates
  • In “Permissions” select ZONE -> DNS -> READ
  • In “Zone Resources” select INCLUDE -> your zone or all
  • If you want you can define a TTL for your token
  • Continue to summary
  • Create Token
  • Copy your token in the config.json file

[Zone identifier]

  • Go in your dashboard and select the correct domain
  • In the overview pannel you can found this token

Installation and start-up instructions

  • Install dependencies:
    • pip install selenium requests
  • Crontab:
    • crontab -e
    • add */5 * * * * /home/cloudflare/cf-dns.py
    • crontab -l

Windows

  • move chromedriver binary in the same directory
  • edit config.json and insert the correct configuration
  • python cf-dns.py

Mac os

  • insert chromedriver binary path on the system path
    • sudo nano /etc/paths
    • example: /Users/luca/chromedriver
  • edit config.json and insert the correct configuration
  • sudo chmod +x cf-dns.py
  • ./cf-dns.py

Linux

  • move chromedriver binary in the same directory
  • edit config.json and insert the correct configuration
  • sudo chmod +x cf-dns.py
  • ./cf-dns.py

arch

Install chromium and chromdriver on archlinux

  • sudo pacman -S chromium

Chromedriver for ARM64 and other

About

This script allows to update ipv4/ipv6 dns on cloudflare also for free domains (.tk .ml .ga .cf .gq) that normally could not because the api is blocked.

Topics

Resources

License

Stars

Watchers

Forks

Languages