Python script to add dns challange for domain hoster inwx based on https://github.com/inwx/python-client

.gitignore ignore python cache 3 years ago
README.md add hint 3 years ago
certbot-dns-auth.py seperate code into functions 3 years ago
certbot-dns-clean.py seperate code into functions 3 years ago
configuration.py update to python3 3 years ago
getIPaddress.py add pssobility to insert public IPv4 or IPv6 address 3 years ago
requirements.txt add pssobility to insert public IPv4 or IPv6 address 3 years ago
update-record.py add hint 3 years ago
README.md

script collection for certbot dns authentification for domains hosted by inwx.de

This script collection is in alpha state and only useable on linux systems. Tested with debian 10 and ubuntu 20.04.

requirements

python

pip3 install inwx-domrobot

or

pip3 install -r requirements.txt

Look at the inwx git repository for more details.

config

A file conf.cfg with inwx settings must e exist in the repository root folder like:

[live]
username = [USERNAME]
password = [PASSWORD]
shared_secret = your_shared_secret

example usage

command line

certbot certonly --manual --server https://acme-v02.api.letsencrypt.org/directory --preferred-challenges=dns --manual-auth-hook [path to this repositry]/certbot-dns-auth.py  --manual-cleanup-hook [path to this repositry]/certbot-dns-clean.py -d example.com -d *.example.com

with config file

wildcard-ini:

email = [YOUR@EMAIL.com]
cert-name = [USERNAME]
rsa-key-size = 4096

server = https://acme-v02.api.letsencrypt.org/directory
authenticator = manual
manual-auth-hook = [path to this repositry]/certbot-dns-auth.py
manual-cleanup-hook = [path to this repositry]/certbot-dns-clean.py

domains = example.com, *.example.com

Command:

certbot certonly -c wildcard-ini

use as basiy dynamic dns

./update-record.py -p -m update -c conf.cfg -t 300 -r AAAA device.example.com

help

usage: update-record.py [-h] -r type [--delete] [-u] [-c path] [-t TTL]
                        [-s section] [-v] [-d]
                        domain [content]

inwx subdomain update

positional arguments:
  domain                full domain like subdomain.example.com
  content               ip or string to fill/update into subdomain domain
                        entry

optional arguments:
  -h, --help            show this help message and exit
  -r type, --record-type type
                        record type (A, AAAA, TXT, CNAME, TLSA)
  --delete              delete existing record with given content, or delete
                        all records if no content is given
  -u, --update          update all existing records if one exists, otherwise
                        fails
  -c path, --config_file path
                        path to configuration file
  -t TTL, --ttl TTL     TTL (time to live) of the nameserver record in seconds
                        (default 3600)
  -s section, --config_section section
                        configuration section (live, ote) default: live
  -v, --verbose         verbose
  -d, --debug           debug

Licences

Get some code snippets from the inwx documentation and from the pyhton 2.7 inwx repository.