https://github.com/tistaharahap/upflare
A simple CLI executable to lookup and update CloudFlare's DNS Records
https://github.com/tistaharahap/upflare
Last synced: 6 months ago
JSON representation
A simple CLI executable to lookup and update CloudFlare's DNS Records
- Host: GitHub
- URL: https://github.com/tistaharahap/upflare
- Owner: tistaharahap
- License: mit
- Created: 2014-10-11T06:25:21.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2014-10-11T06:29:28.000Z (about 11 years ago)
- Last Synced: 2025-03-02T19:19:05.096Z (10 months ago)
- Language: Python
- Size: 87.9 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UpFlare
A simple CLI executable to lookup and update CloudFlare's DNS Records. DIY Dynamic DNS.
## Usage
The followings are required:
- CloudFlare API Key
- CloudFlare Email
- CloudFlare Zone
For lookups, it will query CloudFlare's API method `rec_load_all` and find matching records. While for updates, it will get the external IP from `https://icanhazip.com`.
```bash
# Lookup a domain's rec_id
$ ./upflare --api-key API_KEY --email EMAIL --zone ZONE --lookup --subdomain SUBDOMAIN.ZONE
# Update a record
$ ./upflare --api-key API_KEY --email EMAIL --zone ZONE --lookup --subdomain SUBDOMAIN.ZONE --rec-id REC_ID
```
To keep updating records, schedule this script. Scheduling for every 5 minutes on an Ubuntu machine might look like below.
```
$ crontab -e
*/5 * * * * /home/ubuntu/bin/upflare --api-key API_KEY --email EMAIL --zone ZONE --lookup --subdomain SUBDOMAIN.ZONE --rec-id REC_ID
```