Dockerfile and Ansible playbooks to update DNS entry on Hetzner grapped from Fritzbox.
The docker container executes the playbook every 5 minutes.
docker build . -t hetzner-dyndns
- Login to Fritzbox
- Go to Heimnetz | Netzwerk | Netzwerkeinstellungen
- Enable Statusinformationen über UPnP übertragen (if not already enabled)
docker run -e "DNS_ZONE=<DOMAIN>" -e "API_KEY=<API-KEY>" hetzner-dyndns
Playbooks based on previous work from P. Haberkern (thedatabaseme) with the following adjustments:
- Fritzbox UPNP interface does not need username/password
- Don't update the record if the IP has not changed
- Set TTL for DNS entry to 60 seconds instead of 24 hours