Simple Python 3 script to update CloudFlare A record to match your dynamic IP (basically to access your firewall-free LAN using a domain from the WAN).
- Create a CloudFlare account and a domain
- Update the nameservers of your domain accordingly to CF
- Get a CF token and edit the script(s)
- Run the script using Python 3
requests, json
Open updateIp.py
or openwrt/updateIp.py
(for the openwrt-compatible version) and edit the AUTH_*
and DOMAIN
variables according to yours.
If you are using the stand-alone version, just put it on the crontab. If you are using the openwrt version, add it as script to run when the WAN IP has changed. This version will update the A record basing on the given shell parameter.