Skip to content

FloatingOctothorpe/cloudflare-dynamic-dns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cloudflare-dynamic-dns

Python script to use Cloudflare for dynamic DNS

Setup

  1. Create an A record in CloudFlare

  2. Create an API token with write access to the zone the A record is in.

  3. Run update.py to generate a config file and update the A record to your current public IP address:

    $ python update.py
    Auth token: Njk2ZD-I5ZTA5NDBhNDk1Nzc0OGZlM2ZjOWVmZDI
    Zone name: example.com
    A record name: updateme.example.com
    INFO:root:Saving new config to cloudflare-dynamic-dns.json
    INFO:root:Updated updateme.example.com (1.2.3.4)
    
  4. Periodically re-run the script (e.g. via cron) to keep the A record up-to-date.

About

Python script to use Cloudflare for dynamic DNS

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •