ddns-client
Formula to install and configure a ddns (dynamic dns) client.
Note
See the full Salt Formulas installation and usage instructions.
Available states
ddns-client
Installs and configures a ddns script for use with common name servers, e.g. bind. The script could be executed by a cronjob or by deploying symlinks, e.g. in /etc/ppp/ip-up.d.
Example
For bind:
- Create a dnssec key
dnssec-keygen -a HMAC-MD5 -b 512 -n HOST name-of-key
- Extract private key ('Key: ') from generated 'Ksomething.private'
> cat Ksomething.private Private-key-format: v1.3 Algorithm: 157 (HMAC_MD5) Key: PRIVATE_KEY_HERE <----- Bits: AAA= Created: 20150224131204 Publish: 20150224131204 Activate: 20150224131204
- Create /etc/bind/key.conf with content:
key keyname. { algorithm HMAC-MD5; secret "PRIVATE KEY"; };
- Edit /etc/bind/named.conf.local and include key file:
include "/etc/bind/keys.conf";
- Edit named.conf.local and allow key for host update in desired zone:
zone "dyndns.my.tld" { type master; file "/var/cache/bind/db.dyndns.my.tld"; update-policy{ grant keyname. name home.dyndns.my.tld. ANY; }; };
- Reload bind:
rndc reload
- Create pillar:
ddns_client: server: dns.my.tld zone: dyndns.my.tld hostname: home.dyndns.my.tld key: | key salt-dev. { algorithm HMAC-MD5; secret "PRIVATE KEY"; };
See ddns-client/pillar.example for more details.