This Docker Image is used to update all zones of a DYNv6 account with the current public IP. For example, if you are using several services behind a private router that are accessed via zones of Dynv6, this image resp. the included script helps to update all zones in one go. The script is executed every minute by time control. An update is performed if a new public IP address is detected.
This image offers the following advantages and additions compared to the original script approach:
- platform-independent execution as Docker Container
- use the update method recommended by Dynv6
- support for multiple zone updates
- time-controlled execution and updating
- update when the public IP address changes
- configuration via two Docker environment variables
This image is for use in a private network behind a router. Make sure that the system running the container is used in the network segment that uses the intended public IP address. Especially for routers using split tunneling with e.g. VPN connections, this can lead to incorrect addresses under certain circumstances.
A prepared image can be obtained from my Docker Hub.
The image can be created with the following command:
docker build . -t dynv6-updater
I recommend using docker-compose
.
See example docker-compose.yml.
Adjust the environment variables to match your use case and then just start the image with docker compose up -d
.
https://hub.docker.com/r/sarasmiseth/dynv6-updater/tags
Tag | Description |
---|---|
edge | This tag points to the latest version build from the newest commit in the dev branch. |
nightly | This tag points to the latest version build from the newest commit in the dev branch. It gets rebuild every night. |
latest | This tag points to the latest version build from the latest commit that is tagged in git. See releases. |
vX.Y.Z | There is a tag for each release. |
To use this image, the following environment variables are available:
Variable | Description | Type | Default value |
---|---|---|---|
DYNV6_TOKEN | Enter the token for using the API here. You can find the token under Account -> Keys -> HTTP Tokens -> Token -> Button Details . |
required | |
DYNV6_ZONES | Enter the list of zones to be updated here. If several zones are to be updated, the list must be separated by commas. At least one fully qualified zone must be specified (Example: myzone.dynv6.net or myzone1.dynv6.net,myzone2.dynv6.net ). |
required | |
DYNV6_NETWORK_DEVICE | Enter the name of your network interface. You can find it with ip a . |
required | |
DYNV6_IP_ADDRESS_FILTER | A string that is used with grep to filter the result of ip -6 addr show "$DYNV6_NETWORK_DEVICE" . |
optional | |
DYNV6_USE_AUTO | Calls the api with parameters set to auto . |
optional | false |
Appreciation to
whose adaptations and inspirations are included in the image and script.
In reference to gists:
https://gist.github.com/corny/7a07f5ac901844bd20c9 https://gist.github.com/pulsar256/42313fcb2d3ae805805f
Forked from rfuehrer/dynv6-updater.
Licensed under MIT. See LICENSE.