daschatten / ddns-client-formula

This formula installs and configures a ddns (dynamic dns) client.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ddns-client

Formula to install and configure a ddns (dynamic dns) client.

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:

  1. Create a dnssec key
dnssec-keygen -a HMAC-MD5 -b 512 -n HOST name-of-key
  1. 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
  1. Create /etc/bind/key.conf with content:
key keyname. {
    algorithm HMAC-MD5;
    secret "PRIVATE KEY";
};
  1. Edit /etc/bind/named.conf.local and include key file:
include "/etc/bind/keys.conf";
  1. 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;
    };
};
  1. Reload bind:
rndc reload
  1. 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.

About

This formula installs and configures a ddns (dynamic dns) client.


Languages

Language:Shell 71.6%Language:HTML 28.4%