mirror of
https://codeberg.org/privacy1st/netcup-dns
synced 2024-12-22 23:36:04 +01:00
Update DNS A/AAAA records with your current external IP address using the netcup DNS API.
cron.d | ||
src/netcup_dns | ||
.gitignore | ||
LICENSE | ||
Makefile | ||
pyproject.toml | ||
README.md | ||
requirements.txt | ||
setup.cfg |
netcup DNS
Update DNS records with your current external IP address using the netcup DNS API.
Configuration
For each netcup customer, create a .ini
configuration file. Here is an example:
[credentials]
customer = 123456
api_key = abcdefghijklmnopqrstuvwxyz
api_password = abcdefghijklmnopqrstuvwxyz
[example.com]
hostname = @
type = A
[foo.bar]
hostname = @
type = A
TODOs
Alternative external IP detection:
def external_ip_upnp():
"""
https://stackoverflow.com/a/41385033
Didn't work for me. Even after double checking fritz.box settings:
fritz.box > Heimnetz > Netzwerk > Statusinformationen über UPnP übertragen
"""
import miniupnpc
u = miniupnpc.UPnP()
u.discoverdelay = 1000
u.discover()
u.selectigd()
print('external ip address: {}'.format(u.externalipaddress()))