mirror of
https://codeberg.org/privacy1st/netcup-dns
synced 2025-01-22 03:02:41 +01:00
netcup DNS
Update DNS A/AAAA records with your current external IP address using the netcup DNS API.
Installation
On Arch Linux:
make
With pip
:
make install-pip
Configuration
For each netcup customer, create a .json
configuration file inside /etc/netcup-dpns
.
There is an example configuration.
TODOs
Caching:
- Add parameter
--cache
which saves retrieved DNS records as JSON files. - The method
update_record_destination
will then check if the arguments are the same as the saved JSON record. - Only if they differ, any requests to the API endpoint will be made.
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()))
Languages
Python
83.3%
Makefile
7.9%
Shell
7.2%
Nix
1.6%