Skip to content

Cosmicist/cfddns

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudFlare Dynamic DNS Updater

A simple command to keep a cloudflare's zone record updated with your local ip address so you can use it instead of dyndns.org or similar services.

Installation

Install it globally with composer:

$ composer global require flatline/cfddns:dev-master

Or clone the repo and use ./bin/cfddns.

Usage

First you'll need to create a config file using the init command and then use the update command to update CloudFlare's record.

For the update, you can set up a cron so it's done automatically. I have it run every 15 minutes, I think it's more than enough. But the CloudFlare's API rate limit is 1200 requests every 5 minutes, so, theoretically, you could run it faster if you need to.

The init command

$ cfddns init

The command will ask you for all the needed data and save the config file to your home: ~/cfddns.yml.

If you want to create it manually, there's a sample config file in the repo root you can use.

The update command

To update your CloudFlare record, run the update command:

$ cfddns update

This will automatically grab your public ip and update the CloudFlare's record with it.

The command calls the rec_edit action on the CloudFlare API. The config sets some of the parameters for this command, so check the docs if you need more details.

To do

This are some improvements for the future:

  • Logging (with monolog) This way it can be run in quiet mode and still be able to log errors (useful when runing from a cron)

  • Automatically add record to a zone if the record does not exist

About

Updater to use CloudFlare as a dynamic DNS service

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages