Skip to content

This Python script allows you to update CloudFlare DNS records with the current public IP address. It supports multiple zones and records within each zone.

License

Notifications You must be signed in to change notification settings

MrJacob12/CloudFlare-Dynamic-DNS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CloudFlare Dynamic DNS Updater

This Python script allows you to update CloudFlare DNS records with the current public IP address. It supports multiple zones and records within each zone.

Getting Started

Prerequisites

Before running the script, you'll need:

  • Python 3.x installed on your system
  • Access to the CloudFlare API with a valid API key and email
  • A configuration file (config.json) with your CloudFlare account information and the zones/records you want to update

Installation

  1. Clone the repository to your local machine:
git clone https://github.com/MrJacob12/CloudFlare-Dynamic-DNS.git
  1. Install the required Python packages:
pip install -r requirements.txt
  1. Create .env file in the project directory and populate it with your CloudFlare account information and the zones/records you want to update. Use the provided template in the example below:
CF_API_KEY="KEY"
  1. Create a config.json file in the project directory and populate it with your CloudFlare account information and the zones/records you want to update. Use the provided template in the example below:
{
  "email": "your-email@example.com",
  "key": "your-cloudflare-api-key",
  "zones": [
    {
      "zone": "example.com",
      "zone_id": "your-zone-id",
      "records": [
        {
          "type": "A",
          "rec_id": "your-record-id",
          "name": "api",
          "proxied": true,
          "ttl": 1
        }
      ]
    }
  ]
}

Contributing

If you'd like to contribute to this project, please open an issue or submit a pull request with your proposed changes.

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

This Python script allows you to update CloudFlare DNS records with the current public IP address. It supports multiple zones and records within each zone.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages