GithubHelp home page GithubHelp logo

dyndns-updater's Introduction

Dynamic DNS Updater Script

Introduction

As my router is not performing Dynamic DNS (DynDNS) Updates as it should, I've ended up with this python script. This script is to update Dynamic DNS (DynDNS) records using an external IP service. The script is designed to work with both IPv4 and IPv6 addresses and is intended to help automate the process of keeping your DynDNS hostname up to date with your current IP address.

Prerequisites

Before using the script, ensure you have the following prerequisites:

  • Python 3.x installed on your system.
    • requirements.txt must be installed. You can install it using pip:
    pip install -r requirements.txt
  • Access to a DynDNS service provider that supports updates via HTTP requests.
  • Your DynDNS hostname, username, and password from your service provider.

Configuration

To configure the script, follow these steps: Copy the config.py.dist file to config.py and enter the following information:

  • ipv6Service: The URL of the IPv6 IP service (optional if you don't need IPv6 support).
  • ipv4Service: The URL of the IPv4 IP service.
  • updateUrl: The URL provided by your DynDNS service provider for updating your DNS records. This URL should contain placeholders for , , , and .
  • dynDnsHostName: Your DynDNS hostname.
  • username: Your DynDNS username.
  • password: Your DynDNS password.
  • successMessage: a list containing one or more strings that are expected to be returned by the dyndns service in case of a successful update.

Save the config.py file after making the necessary changes.

Running the Script

Open a terminal or command prompt. Navigate to the directory where the script is located. Run the script using the following command:

python dyndns.py

The script will fetch your current IP address from the specified IP services (IPv4 and/or IPv6) and attempt to update your DynDNS hostname with the retrieved IP address. The script will display a success or failure message depending on the outcome of the update.

CronJob

0 */6 * * * /usr/bin/python3 /path/to/dyndns.py   

dyndns-updater's People

Contributors

aaron-ak avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.