Coder Social home page Coder Social logo

cloudflare_ddns's Introduction

Yet Another Dynamic DNS Client

Dynamic DNS Client for CloudFlare written in Python

Unless you have a static public IP address, this is probably the most reliable way to ensure your servers are always accessible to you over the Internet.

#####Features:

  • Supports IPv4 and IPv6 records (A, AAAA)
  • Supports multiple domains with multiple hosts per domain
  • Simultaneous IPv4 and IPv6 support for single host
  • No third party libraries used. Only standard python libs.
  • Works with Python 2 and 3
  • Designed to run on any OS that supports Python (i.e. not dependent on any OS specific tools)
  • Only makes changes to CloudFlare's zone files when necessary. Stores last IP address of each host in config file.
  • Simple JSON config file
  • Automatically collects and saves the zone and host IDs if missing.

#####Simple JSON config file:

{
 "domains": [
  {
   "hosts": [
    {
     "id": "", 
     "ipv4": "", 
     "ipv6": "", 
     "name": "HOST_NAME_HERE e.g. www", 
     "types": ["A"]
    }
   ], 
   "id": "", 
   "name": "DOMAIN_NAME_HERE e.g. myserver.com"
  }
 ], 
 "user": {
  "api_key": "CLOUDFLARE_API_KEY_HERE", 
  "email": "CLOUDFLARE_EMAIL_HERE"
 }
}

#####Getting Started:

  1. Download and place the cf-ddns.py and cf-ddns.conf files somewhere on your server (e.g. /usr/local/bin/ or ~/).
  2. Open the cf-ddns.conf file in a text editor and specify your email address, API key, domain name, and host name. The record type is set to A by default. Change it to AAAA or add AAAA to the list if necessary.
  3. Set +x permission to the script for your user by running chmod +x /PATH_TO_FILE/cf-ddns.py
  4. Run crontab -e and append this line to it: */5 * * * * /PATH_TO_FILE/cf-ddns.py >/dev/null 2>&1. be sure to change the path to match your setup.
  5. That's it :)

#####Miscellaneous:

  • New features and code improvements are welcomed
  • If you find a bug please create a GitHub issue for it

cloudflare_ddns's People

Contributors

amirazodi avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.