From 898eab78493e5d951105831eacc3e68f85814143 Mon Sep 17 00:00:00 2001 From: altf4arnold Date: Thu, 24 Oct 2024 13:52:34 +0200 Subject: [PATCH] =?UTF-8?q?[ADD]=C2=A0adding=20templates?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- master/named.conf | 21 ++++++++++++ master/named.conf.local | 20 ++++++++++++ master/named.conf.options | 68 +++++++++++++++++++++++++++++++++++++++ slave/named.conf | 11 +++++++ slave/named.conf.local | 9 ++++++ slave/named.conf.options | 67 ++++++++++++++++++++++++++++++++++++++ 6 files changed, 196 insertions(+) create mode 100644 master/named.conf create mode 100644 master/named.conf.local create mode 100644 master/named.conf.options create mode 100644 slave/named.conf create mode 100644 slave/named.conf.local create mode 100644 slave/named.conf.options diff --git a/master/named.conf b/master/named.conf new file mode 100644 index 0000000..03bb915 --- /dev/null +++ b/master/named.conf @@ -0,0 +1,21 @@ +// This is the primary configuration file for the BIND DNS server named. +// +// Please read /usr/share/doc/bind9/README.Debian for information on the +// structure of BIND configuration files in Debian, *BEFORE* you customize +// this configuration file. +// +// If you are just adding zones, please do that in /etc/bind/named.conf.local + +include "/etc/bind/named.conf.options"; +include "/etc/bind/named.conf.local"; +include "/etc/bind/named.conf.default-zones"; + +dnssec-policy "algo13" { + keys { + ksk lifetime unlimited algorithm 13; + zsk lifetime 30d algorithm 13; + }; + max-zone-ttl 1d; + signatures-validity 14d; + signatures-refresh 7d; +}; diff --git a/master/named.conf.local b/master/named.conf.local new file mode 100644 index 0000000..d5324d5 --- /dev/null +++ b/master/named.conf.local @@ -0,0 +1,20 @@ +// +// Do any local configuration here +// + +// Consider adding the 1918 zones here, if they are not used in your +// organization +//include "/etc/bind/zones.rfc1918"; + + +zone "example.com" { + type master; + file "/var/bind/zones/db.example.com"; + allow-query { any; }; + allow-transfer { 192.168.1.1; }; + also-notify { 192.168.1.1; }; + inline-signing yes; + dnssec-policy "algo13"; + key-directory "/etc/bind/keys"; +}; + diff --git a/master/named.conf.options b/master/named.conf.options new file mode 100644 index 0000000..8135b89 --- /dev/null +++ b/master/named.conf.options @@ -0,0 +1,68 @@ +options { + directory "/var/cache/bind"; + + // If there is a firewall between you and nameservers you want + // to talk to, you may need to fix the firewall to allow multiple + // ports to talk. See http://www.kb.cert.org/vuls/id/800113 + + // If your ISP provided one or more IP addresses for stable + // nameservers, you probably want to use them as forwarders. + // Uncomment the following block, and insert the addresses replacing + // the all-0's placeholder. + + // forwarders { + // 0.0.0.0; + // }; + + //======================================================================== + // If BIND logs error messages about the root key being expired, + // you will need to update your keys. See https://www.isc.org/bind-keys + //======================================================================== + dnssec-validation auto; + allow-new-zones yes; + listen-on-v6 { any; }; +}; + + +logging { + channel transfers { + file "/var/log/bind/transfers" versions 3 size 10M; + print-time yes; + severity info; + }; + channel notify { + file "/var/log/bind/notify" versions 3 size 10M; + print-time yes; + severity info; + }; + channel dnssec { + file "/var/log/bind/dnssec" versions 3 size 10M; + print-time yes; + severity info; + }; + channel query { + file "/var/log/bind/query" versions 5 size 10M; + print-time yes; + severity info; + }; + channel general { + file "/var/log/bind/general" versions 3 size 10M; + print-time yes; + severity info; + }; + channel slog { + syslog security; + severity info; + }; + category xfer-out { transfers; slog; }; + category xfer-in { transfers; slog; }; + category notify { notify; }; + + category lame-servers { general; }; + category config { general; }; + category default { general; }; + category security { general; slog; }; + category dnssec { dnssec; }; + + // category queries { query; }; +}; diff --git a/slave/named.conf b/slave/named.conf new file mode 100644 index 0000000..bc71baa --- /dev/null +++ b/slave/named.conf @@ -0,0 +1,11 @@ +// This is the primary configuration file for the BIND DNS server named. +// +// Please read /usr/share/doc/bind9/README.Debian for information on the +// structure of BIND configuration files in Debian, *BEFORE* you customize +// this configuration file. +// +// If you are just adding zones, please do that in /etc/bind/named.conf.local + +include "/etc/bind/named.conf.options"; +include "/etc/bind/named.conf.local"; +include "/etc/bind/named.conf.default-zones"; diff --git a/slave/named.conf.local b/slave/named.conf.local new file mode 100644 index 0000000..282ef63 --- /dev/null +++ b/slave/named.conf.local @@ -0,0 +1,9 @@ +zone "example.com" { + type slave; + notify yes; + file "/var/lib/bind/db-example.com"; + masters { 192.168.1.1; }; + allow-notify { 192.168.1.1; }; + allow-query { any; }; + allow-transfer { "none"; }; +}; diff --git a/slave/named.conf.options b/slave/named.conf.options new file mode 100644 index 0000000..fc01827 --- /dev/null +++ b/slave/named.conf.options @@ -0,0 +1,67 @@ +options { + directory "/var/cache/bind"; + + // If there is a firewall between you and nameservers you want + // to talk to, you may need to fix the firewall to allow multiple + // ports to talk. See http://www.kb.cert.org/vuls/id/800113 + + // If your ISP provided one or more IP addresses for stable + // nameservers, you probably want to use them as forwarders. + // Uncomment the following block, and insert the addresses replacing + // the all-0's placeholder. + + // forwarders { + // 0.0.0.0; + // }; + + //======================================================================== + // If BIND logs error messages about the root key being expired, + // you will need to update your keys. See https://www.isc.org/bind-keys + //======================================================================== + dnssec-validation auto; + + listen-on-v6 { any; }; +}; + +logging { + channel transfers { + file "/var/log/bind/transfers" versions 3 size 10M; + print-time yes; + severity info; + }; + channel notify { + file "/var/log/bind/notify" versions 3 size 10M; + print-time yes; + severity info; + }; + channel dnssec { + file "/var/log/bind/dnssec" versions 3 size 10M; + print-time yes; + severity info; + }; + channel query { + file "/var/log/bind/query" versions 5 size 10M; + print-time yes; + severity info; + }; + channel general { + file "/var/log/bind/general" versions 3 size 10M; + print-time yes; + severity info; + }; + channel slog { + syslog security; + severity info; + }; + category xfer-out { transfers; slog; }; + category xfer-in { transfers; slog; }; + category notify { notify; }; + + category lame-servers { general; }; + category config { general; }; + category default { general; }; + category security { general; slog; }; + category dnssec { dnssec; }; + + // category queries { query; }; +};