version v1
DNS records updater for use with CloudFlare. Written in Python using CloudFlare API v4.
I made this mainly to update my domain DNS A record daily.
- Python 3.5+
- Python modules:
- simplejson
- style
- requests
To install python required modules :
pip3 install -r requirements.txt
This script can be run from terminal, no install required.
API Keys will be saved in
api_data.json
Logs will be saved in
cf.log
- Run
first_time.py
python3 first_time.py
- Enter your details :
- CloudFlare email
- Globle API key
- Select domain and dns record to update.
Once you have verified the application is updating your records as intended,
you may schedule it to run at regular time intervals.
Add updater.py
to your schedule tasks software.
Example: In linux I use crontab
to check and update server ip every day at 12:30 a.m:
29 0 * * * /usr/bin/python3 /path/to/updater.py
- Add more detailed error messages
- Filter DNS records to just records accept ip as value