DynDNS endpoint translation to Hetzner API
Project description
DYNDNS to Hetzner
A DynDNS2 endpoint that changes DNS records using the Hetzner DNS API.
Running
dyndns-to-hetzner is not available via PyPI or Docker hub (yet), so you need to clone this repository or download a release archive
Non-Docker
It is recommended to create a virtual environment for this project.
cd /opt # can be somewhere else if you prefer
python3 -m venv dyndns-to-hetzner
source dyndns-to-hetzner/bin/activate
pip install dyndns-to-hetzner
flask --app dyndns_to_hetzner init-config
The last command will print the location of the configuration file, open it and adjust it to your needs.
It is recommended to use a WSGI server to run this project, e.g. gunicorn:
pip install gunicorn
gunicorn -w 4 'dyndns_to_hetzner:create_app()' --access-logfile=- --bind="127.0.0.1:8080"
If you want to access dyndns_to_hetzner from a different host (e.g. make it available to your router), then you should setup nginx or apache httpd as a reverse proxy and enable SSL/TLS if possible.
Docker
cd docker
cp -a ../config.py.example config.py
Adjust the config.py to your liking.
docker-compose up -d
Using
The update mechanism will be available at http://127.0.0.1/nic/update and expects the hostname and myip GET parameters, whereas hostname is the DNS record you want to update and myip is the IP you want the record to be set to.
Example: http://127.0.0.1/nic/update?hostname=home.example.com&myip=198.51.100.42
Access will only be granted after a successful HTTP Basic Authentication.
FRITZ!Box
FRITZ!Box routers allow setting up a DynDNS provider so the router sends an update to DynDNS anytime its public IP changes. The following settings are required for that:
- Update-URL:
http://HOSTNAME/nic/update?&myip=<ipaddr>&hostname=<domain>(replace HOSTNAME with the IP or hostname of the server that dyndns_to_hetzner is running on, use https instead of http if ssl ) - Domainname: The FQDN of the record you want to have changed
- Username: A username you set in the config.py
- Password: The corresponding password you set in the config.py
After saving, the FRITZ!Box should issue a first update request within a few seconds.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dyndns_to_hetzner-1.0.0.tar.gz.
File metadata
- Download URL: dyndns_to_hetzner-1.0.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27b865c51f00450ae209c9a0ff105ddc7f7f3144307390b2e16ad252e17d01c0
|
|
| MD5 |
f892491a7e63efc7d538fee12159476e
|
|
| BLAKE2b-256 |
7c8c1fe488c5deb59900aef782ebeea2aeed08fd5e4f52256a55ed4f20d7b1f9
|
File details
Details for the file dyndns_to_hetzner-1.0.0-py3-none-any.whl.
File metadata
- Download URL: dyndns_to_hetzner-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
edfdabba670ea4b305989405b72c33f20c0b0ce218388dadc438792422fe21c1
|
|
| MD5 |
5b011808f7beecae003b0c11b9e63851
|
|
| BLAKE2b-256 |
f3fbf7015dd3ff30e89406ea03c940fc50fe8fbf7c7abdfdfe8682d125f4ea15
|