A simple script that automatically fetches your public IPV4 address and updates DNS records on Cloudflare to ensure they are always synchronized. This repository provides a simple and efficient solution for maintaining up-to-date DNS configurations without manual intervention.
- Automatic IP address retrieval: utilizes configurable methods to fetch your current public IP address.
- Cloudflare integration: Seamlessly interacts with the Cloudflare API to manage DNS records.
- Dynamic DNS updates: Updates the DNS records on Cloudflare to reflect the latest IP address, ensuring your services are always accessible.
- Configurable settings: Easily customize the script to match your specific DNS zones, Cloudflare account details, and API settings.
- Logging and error handling: Comprehensive logging and error handling mechanisms provide visibility into the execution and help troubleshoot any issues.
- Set up a Cloudflare account and obtain your API credentials.
- Configure the script by specifying your Cloudflare credentials and desired DNS records.
- Run the script, and it will automatically retrieve your IP address and update the DNS records on Cloudflare.
- Edit & Configure
config/config.py
- API_KEY : set to Cloudflare Global API Key (found at https://dash.cloudflare.com/profile under
API Tokens
>Global API Token
) - API_EMAIL : the email that is associated with your Cloudflare account
- ZONE_ID : the zone id for the target webiste (found at Cloudflare Overview website page, click on desired website, on the right side-bar at the bottom will be the
Zone Token
) - RECORD_NAME : the respective name for the target DNS Record
- RECORD_TYPE : the respective type for the target DNS Record
python ./main.py
- within the download path.
Please note that this is a community-driven project and should be used at your own risk. Make sure to review the code and customize it to fit your requirements before deploying it in production environments.
Contributions are welcome! If you encounter any issues or have ideas for improvements, feel free to submit a pull request or open an issue in the repository.