Skip to main content

Update DNS settings using the Schlundtech XML-Gateway

Project description

This packages provides a way to update DNS records programmatically, for customers of Schlundtech, using their XML-Gateway.

Many thanks to https://github.com/martinlowinski/php-dyndns for doing the heavy lifting of figuring out how to talk to the XML-Gateway in a way that actually makes it do what we want.

Usage

First, you need to create a subdomain with an A-record in your domain, say home.example.com.

Then you can use the command-line utility provided by this package, like so:

$ schlund-ddns --username USER --password PASS home.example.com 1.2.3.4

(See schlund-ddns --help for more configuration parameters, e.g. the context that you were told to use when applying for the XML-Gateway.)

Instead of passing the parameters on the commandline, you can instead call schlund-ddns --config myconfig.ini (see below for the file format).

Alternatively, set up the provided cgi script schlund-ddns-cgi to provide HTTP access. You’ll need to provide username and password using a configuration file and then passing that file’s path as an environment variable. Here’s an example apache configuration snippet to do this:

ScriptAlias /dns-update /path/to/ddns/schlund-ddns-cgi
<Location /dns-update>
  SetEnv DDNS_CONFIG /path/to/ddns/config

  AuthName "Dynamic DNS"
  AuthType Basic
  AuthUserFile /path/to/ddns/htpasswd
  require valid-user
</Location>

The configuration file is a standard ini file and should look like this:

[default]
username = USER
password = PASS
context  = CONTEXT

You can optionally add an allowed_hostnames = one.example.com two.example.com whitespace-separated list to the config file, only those will then be accepted.

The HTTP protocol is modeled after the one from NoIP, that is, clients should perform a request like this to trigger a DNS update:

http://example.com/dns-update?hostname=home.example.com&myip=1.2.3.4

There is also a docker image of the HTTP service here: https://hub.docker.com/r/customelements/schlund-ddns

2FA support

  • Install pip install pyotp in addition to this package

  • Pass the 2FA secret (probably 16 characters, you may have to reverse-engineer them from the QR-Code used for setup) as –totp-secret` commandline or configuration parameter

CHANGES

1.4.0 (2023-05-12)

Changes

  • Fix config parsing after introducing totp secret parameter (totp)

1.3.1 (2023-04-04)

Changes

  • Switch from setup.py to pyproject.toml (wheel)

1.3.0 (2023-03-20)

  • Support a configuration file for the command line script

  • Determine the domain name correctly for multi-level subdomains

  • Support 2FA TOTP authentication

  • Drop Python-2 support

1.2.0 (2020-10-04)

  • Model our response text after the noip.com protocol

1.1.1 (2018-03-05)

  • Handle PATH_INFO internally

1.1.0 (2018-03-03)

  • Add optional allowed_hostnames config option

1.0.4 (2018-03-03)

  • Make web part Python-3 compatible

1.0.3 (2018-03-03)

  • Make current-setuptools compatible

1.0.2 (2018-03-03)

  • Make Python-3 compatible

1.0.1 (2018-01-14)

  • Move from bitbucket to github

1.0.0 (2014-04-06)

  • First release.

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

ws.ddns-1.4.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

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

ws.ddns-1.4.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file ws.ddns-1.4.0.tar.gz.

File metadata

  • Download URL: ws.ddns-1.4.0.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for ws.ddns-1.4.0.tar.gz
Algorithm Hash digest
SHA256 b341d7dd0c1cdc62e389f5f99987a077503a6e0a3ae822966c3b59186a0fea74
MD5 f6bce40fb56fd9e5a4e486527fe0928d
BLAKE2b-256 b2c5c9df9d43af6f4a6e3bc6c978cab1763ddc0a2f5d90a6b73cb1ef9fe2f107

See more details on using hashes here.

File details

Details for the file ws.ddns-1.4.0-py3-none-any.whl.

File metadata

  • Download URL: ws.ddns-1.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.3

File hashes

Hashes for ws.ddns-1.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3a4cd216e07c9b712c4e59ffc3532556ac4876cadff144271be2f9793dfa91b1
MD5 b61e288102e5d597410e75ac47ab81cb
BLAKE2b-256 3d65ab005b52fc5ff2fc5841c00f80c32e943eb5558fb0e86a0016bbdecf55fa

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