You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Alinson S. Xavier 178173b628
Add systemd scripts and instructions
5 years ago
etc Add systemd scripts and instructions 5 years ago
.gitignore Initial version 5 years ago
COPYING.md Add license 5 years ago
Makefile Add systemd scripts and instructions 5 years ago
README.md Add systemd scripts and instructions 5 years ago
hetzner-ddns.py Initial version 5 years ago

README.md

Hetzner Dynamic DNS Updater

This script finds this machine's hostname, public IPv4 and IPv6 addresses, then updates the corresponding DNS records on Hetzner.

Usage

Usage:
  hetzner-ddns.py [options]

Options:
  -h --help             Show this screen
  --token=<str>         Hetzner API Token
  --zone=<str>          Name of the DNS zone
  --hostname=<std>      This machine's hostname
  --ttl=<n>             Time-to-live in seconds
  --v4-api=<url>        API that returns your public IPv4 address
  --v6-api=<url>        API that returns your public IPv6 address
  --retry-attempts=<n>  Retry N times if connection fails
  --retry-delay=<s>     Wait S seconds between attempts
  --config=<file>       Read options from configuration file
  --disable-v4          Do not update IPv4 address
  --disable-v6          Do not update IPv6 address

Running during boot

The instructions below were tested on Ubuntu Linux 20.04 LTS.

  1. Install python3 and pip:

apt install python3

  1. Install package dependencies:

pip install docopt

  1. Clone the repository somewhere:

cd /opt git clone https://github.com/iSoron/hetzner-ddns.git

  1. Install the script system-wide:

cd hetzner-ddns sudo make install

  1. Create a configuration file in /etc/hetzner-ddns.conf with you API token. See /etc/hetzner-ddns.conf.example for an example.

  2. Run script and enable it during boot:

systemctl start hetzner-ddns systemctl enable hetzner-ddns

License

MIT