diff --git a/lib/configfiles/freebsd.inc.php b/lib/configfiles/freebsd.inc.php index ebb294a4..87f8a614 100644 --- a/lib/configfiles/freebsd.inc.php +++ b/lib/configfiles/freebsd.inc.php @@ -103,6 +103,42 @@ return Array( 'dns' => Array( 'label' => $lng['admin']['configfiles']['dns'], 'daemons' => Array( + + // Begin: Bind 9.x Config + 'bind9' => array( + 'label' => 'Bind9 Nameserver', + 'commands_1' => array( + 'cd /usr/ports/dns/bind99', + 'make config', + 'set [x] International Domain Names', + 'set [x] IPv6 protocol (default)', + 'set [x] 64-bit file support', + 'set [x] Replace base BIND with this version', + 'set [x] Enable RPZ NSDNAME policy records', + 'set [x] Enable RPZ NSIP trigger rules', + 'set [x] dig/host/nslookup will do DNSSEC validation', + 'set [x] Build with OpenSSL (Required for DNSSEC) (default)', + 'set [x] Threading support (default)', + 'make install clean; rehash', + ), + 'commands_2' => array( + 'echo "named_enable=\"YES\"" >> /etc/rc.conf', + PHP_EOL, + (strpos($settings['system']['bindconf_directory'], '/etc/namedb') === false) ? '(TIP: Be sure the path below is "/etc/namedb", if not you have configured the bind-directory in a false way in PANEL->SETTINGS->NAMESERVER SETTINGS!)' : null, + 'echo "include \"'. $settings['system']['bindconf_directory'] .'froxlor_bind.conf\";" >> '. $settings['system']['bindconf_directory'] .'named.conf', + 'echo "include \"'. $settings['system']['bindconf_directory'] .'default-zone\";" >> '. $settings['system']['bindconf_directory'] .'named.conf', + ), + 'files' => array( + 'etc_namedb_named.conf' => $settings['system']['bindconf_directory'] .'named.conf', + 'etc_namedb_master_default.zone' => $settings['system']['bindconf_directory'] .'master/default.zone', + 'etc_namedb_default-zone' => $settings['system']['bindconf_directory'] .'default-zone', + ), + 'restart' => array( + '/etc/rc.d/named restart' + ) + ), + // End: Bind 9.x Config + 'powerdns' => Array( 'label' => 'PowerDNS', 'commands_1' => Array( diff --git a/templates/misc/configfiles/freebsd/bind9/etc_namedb_default-zone b/templates/misc/configfiles/freebsd/bind9/etc_namedb_default-zone new file mode 100644 index 00000000..3d95158a --- /dev/null +++ b/templates/misc/configfiles/freebsd/bind9/etc_namedb_default-zone @@ -0,0 +1,4 @@ +zone "default.zone" { + type master; + file "/etc/namedb/master/default.zone"; +}; diff --git a/templates/misc/configfiles/freebsd/bind9/etc_namedb_master_default.zone b/templates/misc/configfiles/freebsd/bind9/etc_namedb_master_default.zone new file mode 100644 index 00000000..7b751f0a --- /dev/null +++ b/templates/misc/configfiles/freebsd/bind9/etc_namedb_master_default.zone @@ -0,0 +1,45 @@ +; default zone + +$TTL 1W + +; SOA Record +@ IN SOA ns0 hostmaster ( + 2013031201 ; serial + 1D ; refresh + 1H ; retry + 1W ; expiry + 1D ; minimum +) + +@ IN NS ns0 + IN MX 10 mail + +@ IN A + IN MX 10 mail + +* IN A + IN MX 10 mail + +; Subdomain Records +ns0 IN A +mail IN A + +; Additional Records +@ IN RP hostmaster . + IN SPF "v=spf1 a mx -all" + IN TXT "dkim=all" + +; Services Records +_http._tcp IN SRV 1 0 80 @ +_http._tcp.www IN SRV 0 0 80 www +_ftp._tcp IN SRV 0 0 20 @ +_ftp._tcp IN SRV 0 0 21 @ +_dns._udp.ns0 IN SRV 0 1 53 ns0 +_dns._tcp.ns0 IN SRV 0 0 53 ns0 +_smtps._tcp.mail IN SRV 0 0 587 mail +_smtps._tcp.mail IN SRV 1 0 465 mail +_smtp._tcp.mail IN SRV 2 0 25 mail +_imaps._tcp.mail IN SRV 0 0 993 mail +_imap._tcp.mail IN SRV 1 0 143 mail +_sieve._tcp.mail IN SRV 0 0 4190 mail +_sieve._tcp.mail IN SRV 1 0 2000 mail diff --git a/templates/misc/configfiles/freebsd/bind9/etc_namedb_named.conf b/templates/misc/configfiles/freebsd/bind9/etc_namedb_named.conf new file mode 100644 index 00000000..486de9a2 --- /dev/null +++ b/templates/misc/configfiles/freebsd/bind9/etc_namedb_named.conf @@ -0,0 +1,32 @@ +options { + + ... + + [snip] + + # General + directory "/etc/namedb/working"; + pid-file "/var/run/named.pid"; + + auth-nxdomain no; + + # Cache + dump-file "/var/db/named"; + max-cache-size 8m; + + # DNSSEC + //======================================================================== + // 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-enable yes; + dnssec-validation yes; + dnssec-lookaside auto; + + random-device "/dev/urandom"; + + [/snip] + + ... + +}; \ No newline at end of file