harrego / cloudflare-ddns Goto Github PK
View Code? Open in Web Editor NEWThis project forked from dcerisano/cloudflare-dynamic-dns
Cloudflare dynamic DNS shell script with support for multiple zones and records
License: MIT License
This project forked from dcerisano/cloudflare-dynamic-dns
Cloudflare dynamic DNS shell script with support for multiple zones and records
License: MIT License
cloudflare-ddns Update/create Cloudflare records with an A record pointing to the public IP of the host. Records are specified by listing a zone with -z followed by a list of unproxied (-r) or proxied (-p) records (full domain format), see OPTIONS. Multiple zones and records can be specified, see EXAMPLE. Recommended to be ran in a crontab every 5 minutes. The public IP is determined by using the endpoint 'api.ipify.org', which returns the public IP in plain text. The IP is cached to '/tmp/cloudflare-ddns-public-ip' in order to only make Cloudflare API requests when on IP change. Both the endpoint and caching behavior can be changed, see ADVANCED OPTIONS. Script output is minimal, only when the IP changes does the script report results. If you intend to notify only on IP changes/record updates then conditionally doing so on any output will suffice. REQUIREMENTS: * jq (apt install jq / pacman -S jq / brew install jq). * Cloudflare zone already configured. * Cloudflare API token with permissions: * Zone.Zone * Zone.DNS USAGE: cloudflare-ddns.sh [OPTIONS] -t <token> -z <zone> -r <record>... OPTIONS: -t <token> Cloudflare token, can also be set with environment variable CLOUDFLARE_API_TOKEN. -z <zone> Zone name (full domain, excluding subdomains) for proceeding records. -r <record> New/existing record name for preceding zone containing entire domain, e.g. foo.bar.com. -p <record> Like -r (above), but record will be Cloudflare proxied. ADVANCED OPTIONS: -i <new ip> Skip checking endpoint for public IP and use specified instead. -I <old ip> Skip checking the cached old public IP and use specified instead. -E <endpoint> Override default curl endpoint to determine public IP, must return in plain text. -C <cache file> Override default IP cache file and use specified instead. Specify \"\" to disable caching. EXAMPLE: cloudflare-ddns.sh -t <token> -z bar.com -r foo.bar.com -p foo2.bar.com -z y.com -p y.com -p www.y.com Set the A records of the listed domains across two zones to be the current public IP. foo2.bar.com, y.com, and www.y.com will be proxied by Cloudflare (denoted by -p), foo.bar.com will not (denoted by -r).
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.