Package: dyndns
Aboutdyndnsis a HTTP based API to
dynamically update DNS records (DynDNS). It’s uses Python and the
Flask web framework to accomplish this task.InstallationInstalldyndnsinto the directory/usr/local/share/python-virtualenv/dyndnsusing a virtual
environment.python3 -m venv /usr/local/share/python-virtualenv/dyndns
source /usr/local/share/python-virtualenv/dyndns/bin/activate
pip3 install dyndnsThe working directory of our flask web API is in the directory/var/www/dyndns.example.com. Create a file/var/www/dyndns.example.com/dyndns.ini.[uwsgi]module=dyndns.webapp:appmaster=trueprocesses=5socket=/var/www/dyndns.example.com/dyndns.sockchmod-socket=664uid=www-datagid=www-datavacuum=truedie-on-term=trueExample configuration file for nginx:/etc/nginx/sites-available/dyndns.example.com.server {
  server_name dyndns.example.com;
  listen 80;
  listen [::]:80;
  return 301 https://$host$request_uri;
}

server {
  listen 443 ssl;
  listen [::]:443 ssl;
  server_name dyndns.example.com;
  ssl_certificate /etc/letsencrypt/live/dyndns.example.com/fullchain.pem;
  ssl_certificate_key /etc/letsencrypt/live/dyndns.example.com/privkey.pem;

  location / {
    include uwsgi_params;
    uwsgi_pass unix:/var/www/dyndns.example.com/dyndns.sock;
  }

}/etc/systemd/system/dyndns-uwsgi.service[Unit]
Description=uWSGI instance to serve dyndns
After=network.target

[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/dyndns.example.com
Environment="PATH=/usr/local/share/python-virtualenv/dyndns/bin"
ExecStart=/usr/local/share/python-virtualenv/dyndns/bin/uwsgi --ini uwsgi.ini

[Install]
WantedBy=multi-user.targetConfigurationdyndnsrequires a configuration file in the YAML markup language.dyndnslooks on three places for its configuration. It picks the
first existing configuration file and ignores the later in this order:Custom path specified in the environment variabledyndns_CONFIG_FILECurrent working directory of thedyndnsapp (cwd):<cwd>/.dyndns.yml/etc/dyndns.yml---secret:12345678nameserver:127.0.0.1dyndns_domain:dyndns.example.comzones:-name:dyndns.example.comtsig_key:tPyvZA==secret: A password like secret string. The secret string has to
be at least 8 characters long and only alphnumeric characters are
allowed.nameserver: The IP address of your nameserver. Version 4 or
version 6 are allowed. Use127.0.0.1to communicate with your
nameserver on the same machine.dyndns_domain: The domain to serve thedyndnsHTTP API. This
key is only used in the usage page. Can be omitted.zones: At least one zone specified as a list.name: The domain name of the zone, for exampledyndns.example.com.tsig_key: The tsig-key. Use thehmac-sha512algorithm to
generate the key:tsig-keygen-ahmac-sha512dyndns.example.comUsagedyndnsoffers two HTTP web APIs to update DNS records. A simple
and a more restricted one using only path segments and a more flexible
using query strings.Update by path<your-domain>/update-by-path/secret/fqdn<your-domain>/update-by-path/secret/fqdn/ip_1<your-domain>/update-by-path/secret/fqdn/ip_1/ip_2Update by query<your-domain>/update-by-query?secret=secret&fqdn=fqdn&ip_1=1.2.3.4Arguments for the query stringsecret: A password like secret string. The secret string has to
be at least 8 characters long and only alphnumeric characters are
allowed.fqdn: The Fully-Qualified Domain Name (e. g.www.example.com).
If you specify the argumentfqdn, you don’t have to specify the
argumentszone_nameandrecord_name.zone_name: The zone name (e. g.example.com). You have to
specify the argumentrecord_name.record_name: The record name (e. g.www). You have to
specify the argumentzone_name.ip_1: A IP address, can be version 4 or version 6.ip_2: A second IP address, can be version 4 or version 6. Must
be a different version thanip_1.ipv4: A IP address version 4.ipv6: A IP address version 6.ttl: Time to live. The default value is 300.Delete by pathHit this url to delete a DNS record corresponding to thefqdn.
Both ipv4 and ipv6 entries are deleted.<your-domain>/delete-by-path/secret/fqdn