Skip to main content

A CLI tool for updating the IP address at dynamic DNS providers.

Project description

Poetry Ruff codecov Pipeline

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 calling one the following IP address services using a 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 [ipfy|dyndns]
                                  Type of IP address provider. Default: ipfy
  --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.
  --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=ipfy
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

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

dynamic_dns_update_client-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dynamic_dns_update_client-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

Details for the file dynamic_dns_update_client-0.1.0.tar.gz.

File metadata

  • Download URL: dynamic_dns_update_client-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.11.9 Darwin/23.6.0

File hashes

Hashes for dynamic_dns_update_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4413e8bcf6a55f59868724fe12d7c21fb7b26cd9a0a7426fe316f3a806cf2bf5
MD5 c2713e2c4d1d79dbd02abd3d5edc5931
BLAKE2b-256 086921645333d0ee143c4d47f1c13ec774f393ba5de552f4a4ed4032f08197e0

See more details on using hashes here.

File details

Details for the file dynamic_dns_update_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dynamic_dns_update_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f03efa063f298dcd982ce18f741b42919a59ed4d125c51d19ef1fcd6e0943c8
MD5 fe5f0610f6e8f62a9987e90c550538bd
BLAKE2b-256 43b2fb21afba637d8b4e92b081a948468f5f88ddec41fc1ddf16934e14c35773

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page