DNS » History » Version 2
Marc Dequènes, 2018-05-04 15:24
| 1 | 1 | Marc Dequènes | h1. DNS |
|---|---|---|---|
| 2 | |||
| 3 | h2. Zone Management |
||
| 4 | |||
| 5 | On each DNS server, master zone can be created/updated on _/etc/bind/masters/_. The ownership needs to be: |
||
| 6 | * _banya:_ if a user zone which should be updatable via the Banya service |
||
| 7 | * _root:bind_ in all other cases |
||
| 8 | |||
| 9 | The zone is declared in _host_vars/_dnsserver_/dns.yml_ and the playbook _playbooks/tenants/duckcorp/dns.yml_ is in charge of updating all configurations. Only the zone content is not Ansible managed. |
||
| 10 | |||
| 11 | 2 | Marc Dequènes | Better to check the file validity before updating the zone: |
| 12 | <pre> |
||
| 13 | named-checkzone <zone-name> <zone-file> |
||
| 14 | </pre> |
||
| 15 | |||
| 16 | Then to update the zone, if DNSSEC-signed: |
||
| 17 | <pre> |
||
| 18 | ods-signer sign <zone-name> |
||
| 19 | </pre> |
||
| 20 | else: |
||
| 21 | <pre> |
||
| 22 | rndc reload <zone-name> |
||
| 23 | </pre> |
||
| 24 | |||
| 25 | In case the zone is DNSSEC-signed, the publishing of keys in the parent zone is to be done manually (not automated yet); more details below. |
||
| 26 | 1 | Marc Dequènes | |
| 27 | h2. Secure Zone Transfers |
||
| 28 | |||
| 29 | To secure zone transfers, a TSIG key needs to be created and added on both sides. Beware the key name *must* be identical on both side. |
||
| 30 | |||
| 31 | DNS server groups (servers allowed to request transfer) and keys can be defined in _host_vars/<dnsserver>/dns.yml_ and _host_vars/<dnsserver>/dns.vault.yml_ respectively. If they are to be used on all servers, then you can declare them in _group_vars/dns_servers/dns.yml_ and _group_vars/dns_servers/dns.vault.yml_ respectively. |
||
| 32 | |||
| 33 | You can a new key using: |
||
| 34 | <pre> |
||
| 35 | dnssec-keygen -a HMAC-SHA512 -b 512 -n HOST taiste |
||
| 36 | </pre> |
||
| 37 | Take the 'Key' part in 'Ktaiste.*.private' file, to put into the configuration. |
||
| 38 | |||
| 39 | The same playbook (_playbooks/tenants/duckcorp/dns.yml_) is used to update the configuration. |
||
| 40 | |||
| 41 | h2. DNSSEC |
||
| 42 | |||
| 43 | TODO |