diff --git a/FreeBSD.md b/FreeBSD.md index 0787ece..aef0e71 100644 --- a/FreeBSD.md +++ b/FreeBSD.md @@ -58,4 +58,58 @@ cp "$f" /destination/newname-"$f" end ``` -Use quotes if filenames have spaces \ No newline at end of file +Use quotes if filenames have spaces + +## Bind + +### Adding a new Zone with DNSSEC to bind + +Add the new zone to named.conf in /usr/local/etc/named + +``` sh +zone "example.com" { + type master; + file "/etc/bind/zones/db.example.com"; + #dnssec-policy default; // Uses the built-in default policy + #inline-signing yes; // Required for automatic signing +}; +``` + +Check configuration + +```sh +named-checkconf +named-checkzone example.com /etc/bind/zones/db.example.com +rndc reload +``` + +Sign the zone by setting policy and type of signing + +``` sh +zone "example.com" { + type master; + file "/etc/bind/zones/db.example.com"; + dnssec-policy default; // Uses the built-in default policy or create / apply one + inline-signing yes; // Required for automatic signing +}; +``` + +Create the folder under keys/ if needed + +``` sh +mkdir keys/example.com +``` + +Check DNSSEC records + +``` sh +named-checkconf +rndc reload +dig @localhost DNSKEY example.com +``` + +Add created DS key to registrar + +``` +dnssec-dsfromkey Kexample.com.+013+.key +```