A CLI tool for updating the IP address at dynamic DNS providers.
Project description
Dynamic DNS Update Client
A CLI tool for updating the IP address at dynamic DNS providers.
Instead of supporting any dynamic DNS provider in the world (like almost any other tool I found), this CLI tool aims to be a flexible tool kit. Using it, you can put together a solution which works for 90% of the use cases.
It obtains the current IP address by different means depending on the --ip-address-provider option:
openwrt_networkon an OpenWRT device by calling OpenWRT specific functions, specify network with--ip-networkinterfacephysical network interface to look for the public IP address, specify interface with--ip-interface- by calling one of the following IP address services using an HTTP GET request:
It then updates the obtained IP address with another HTTP GET request at the dynamic DNS provider using the specified URL parameters and authentication method.
You can run it from any machine which has a Python v3 environment.
Install
$ pip install dynamic-dns-update-client
Usage
For instance, executing:
$ dynamic-dns-update-client https://example.com --ip-address-url-parameter-name ip-address --url-parameter api-token=nd4u33huruffbn
Will result in calling: GET https://example.com/?ip-address=172.16.31.10&api-token=nd4u33huruffbn
$ dynamic-dns-update-client --help
Usage: dynamic-dns-update-client [OPTIONS] DYNAMIC_DNS_PROVIDER_URL
Dynamic DNS Update Client.
A CLI tool for updating the IP address for dynamic DNS providers. It obtains
the current IP address by calling one the following IP address services
using a HTTP GET request:
- ipfy: https://www.ipify.org/
- dyndns: https://help.dyn.com/remote-access-api/checkip-tool/
It then updates the obtained IP address with another HTTP GET request at the
dynamic DNS provider using the specified URL parameters and authentication
method.
Options:
--ip-address-provider [openwrt_network|interface|ipify|dyndns]
Type of IP address provider. Default: ipify
--ip-network TEXT OpenWRT network to look for the public IP
address. Default: wan
--ip-interface TEXT Physical interface to look for the public IP
address. Default: eth0
--ipv6 Use IP V6 addresses.
--ip-address-url-parameter-name TEXT
Name of the URL parameter for IP address. It
will be appended to the dynamic DNS provider
URL. [required]
--url-parameter URL_PARAMETER URL parameter which will be appended to the
dynamic DNS provider URL. Format:
param=value
--basic-auth-username TEXT Basic Auth username for calling dynamic DNS
provider URL.
--basic-auth-password TEXT Basic Auth password for calling dynamic DNS
provider URL.
--dry-run Instead of calling the dynamic DNS provider,
print the URL which would have been called.
--help Show this message and exit.
Environment Variables
If you are concerned about security and don't want to use the CLI options for secrets or passwords, you can also use the following environment variables to provide these values to Dynamic DNS Update Client.
DYNAMIC_DNS_UPDATE_CLIENT_IP_ADDRESS_PROVIDER=ipify
DYNAMIC_DNS_UPDATE_CLIENT_IP_NETWORK=wan
DYNAMIC_DNS_UPDATE_CLIENT_IP_INTERFACE=eth0
DYNAMIC_DNS_UPDATE_CLIENT_IPV6=0
DYNAMIC_DNS_UPDATE_CLIENT_IP_ADDRESS_URL_PARAMETER_NAME=ip
DYNAMIC_DNS_UPDATE_CLIENT_URL_PARAMETER="foo=bar boom=bang cat=mouse"
DYNAMIC_DNS_UPDATE_CLIENT_BASIC_AUTH_USERNAME=username
DYNAMIC_DNS_UPDATE_CLIENT_BASIC_AUTH_PASSWORD=password
DYNAMIC_DNS_UPDATE_CLIENT_DRY_RUN=0
Project details
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 dynamic_dns_update_client-0.3.0.tar.gz.
File metadata
- Download URL: dynamic_dns_update_client-0.3.0.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
19e3467867d725ba33bb9de8e9262408eb3381e72ac780df531841c8f6e11e7d
|
|
| MD5 |
9e14fb9d12d150b4f0cee2d902b8a59c
|
|
| BLAKE2b-256 |
3db12540a2a6a13106830f4c7e5612bcbc2a13c1fcaf66e43c7900c6c1b496e0
|
File details
Details for the file dynamic_dns_update_client-0.3.0-py3-none-any.whl.
File metadata
- Download URL: dynamic_dns_update_client-0.3.0-py3-none-any.whl
- Upload date:
- Size: 9.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.3 Linux/6.11.0-1015-azure
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cda62444fa7890988ed57b162b9524d421428f86543851d97f0150fcc26ded10
|
|
| MD5 |
bdb440bd5cd3b7bc4b5eb26f6a7daf55
|
|
| BLAKE2b-256 |
81ffd5cf8242fa71e957e801f0da98777e74aa9d91ac9c0bb0fed131f30454b7
|