Skip to content

Instantly share code, notes, and snippets.

@gvisoc
Last active January 11, 2023 22:05
Show Gist options
  • Save gvisoc/9bc137a7c01a149f5d5e146f1827f211 to your computer and use it in GitHub Desktop.
Save gvisoc/9bc137a7c01a149f5d5e146f1827f211 to your computer and use it in GitHub Desktop.
Effective `ddclient.conf` (uncommented lines only) to work with Cloudflare DDNS

Configuration values for ddclient to work with Cloudflare

The date of last review of this Gist is 2023-01-12. Some changes may be needed depending on when you read this

This configuration works with an API Token generated on your Cloudflare profile with Edit Zone DNS (Zone.DNS) permission for a particular domain (1 Zone), that has to be the same domain.com referred in the configuration.

You will have to update domain and subdomains, and also the line password=[token] with your token:

password=238AF6723EF...

You can set up tokens in your Cloudflare Profile and then {} API Tokens.

Don't forget to open your ports on your firewalls and configure NAT rules on your router!

# Global configuration
# check every 300 seconds
daemon=300
# log update msgs to syslog
syslog=yes
# mail all msgs to root
mail=root
# mail failed update msgs to root
mail-failure=root
# record PID in file.
pid=/var/run/ddclient.pid
# use ssl-support.
ssl=yes
# Cloudflare configuration
use=web
web=ipinfo.io/ip
protocol=cloudflare, \
zone=domain.com, \
ttl=1, \
login=token, \
password=[token] \
sub.domain.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment