ubuntu:bind:configure_bind9:my_configuration
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ubuntu:bind:configure_bind9:my_configuration [2020/12/09 13:58] – created peter | ubuntu:bind:configure_bind9:my_configuration [2020/12/09 19:32] (current) – [ad-blacklist] peter | ||
---|---|---|---|
Line 3: | Line 3: | ||
This is my current configuration. | This is my current configuration. | ||
+ | ===== named.conf ===== | ||
+ | |||
+ | <file bash / | ||
+ | // This is the primary configuration file for the BIND DNS server named. | ||
+ | // | ||
+ | // Please read / | ||
+ | // structure of BIND configuration files in Debian, *BEFORE* you customize· | ||
+ | // this configuration file. | ||
+ | // | ||
+ | // If you are just adding zones, please do that in / | ||
+ | |||
+ | include "/ | ||
+ | include "/ | ||
+ | include "/ | ||
+ | // include "/ | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | Without this, errors are seen when trying to start bind. | ||
+ | |||
+ | <code bash> | ||
+ | named[2211]: | ||
+ | named[2211]: | ||
+ | named[2211]: | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== named.conf.logging ===== | ||
+ | |||
+ | <file bash / | ||
+ | //logging { | ||
+ | // channel querylog{ | ||
+ | // file "/ | ||
+ | // severity debug 3; | ||
+ | // print-category yes; | ||
+ | // print-time yes; | ||
+ | // print-severity yes; | ||
+ | // }; | ||
+ | // category queries { querylog;}; | ||
+ | //}; | ||
+ | |||
+ | |||
+ | |||
+ | logging { | ||
+ | channel default_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | // severity debug 3; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel general_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | // severity debug 3; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel database_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel security_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel config_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel resolver_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-time yes; | ||
+ | }; | ||
+ | channel xfer-in_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel xfer-out_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel notify_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel client_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel unmatched_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel queries_file { | ||
+ | file "/ | ||
+ | // severity debug 3; | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel network_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel update_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel dispatch_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel dnssec_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | channel lame-servers_file { | ||
+ | file "/ | ||
+ | severity dynamic; | ||
+ | print-category yes; | ||
+ | print-time yes; | ||
+ | print-severity yes; | ||
+ | }; | ||
+ | |||
+ | category default { default_file; | ||
+ | category general { general_file; | ||
+ | category database { database_file; | ||
+ | category security { security_file; | ||
+ | category config { config_file; | ||
+ | category resolver { resolver_file; | ||
+ | category xfer-in { xfer-in_file; | ||
+ | category xfer-out { xfer-out_file; | ||
+ | category notify { notify_file; | ||
+ | category client { client_file; | ||
+ | category unmatched { unmatched_file; | ||
+ | category queries { queries_file; | ||
+ | category network { network_file; | ||
+ | category update { update_file; | ||
+ | category dispatch { dispatch_file; | ||
+ | category dnssec { dnssec_file; | ||
+ | category lame-servers { lame-servers_file; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== named.conf.options ===== | ||
+ | |||
+ | <file bash / | ||
+ | acl " | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | }; | ||
+ | |||
+ | |||
+ | options { | ||
+ | directory "/ | ||
+ | |||
+ | // version statement - inhibited for security | ||
+ | // (avoids hacking any known weaknesses)»· | ||
+ | version " | ||
+ | |||
+ | // 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:// | ||
+ | |||
+ | // If your ISP provided one or more IP addresses for stable· | ||
+ | // nameservers, | ||
+ | // Uncomment the following block, and insert the addresses replacing· | ||
+ | // the all-0' | ||
+ | |||
+ | // forwarders { | ||
+ | // | ||
+ | // }; | ||
+ | |||
+ | forwarders { | ||
+ | // Sure Public DNS | ||
+ | // | ||
+ | // | ||
+ | |||
+ | // Google Public DNS | ||
+ | //8.8.8.8; | ||
+ | //8.8.4.4; | ||
+ | |||
+ | // OpenDNS | ||
+ | // | ||
+ | // | ||
+ | | ||
+ | // PI-Hole. | ||
+ | 192.168.1.26; | ||
+ | 192.168.1.25; | ||
+ | }; | ||
+ | |||
+ | |||
+ | // | ||
+ | // If named logs error messages about the root key being expired, | ||
+ | // you will need to update your keys. See https:// | ||
+ | // | ||
+ | # | ||
+ | dnssec-enable no; | ||
+ | dnssec-validation no; | ||
+ | |||
+ | auth-nxdomain no; # conform to RFC1035 | ||
+ | listen-on-v6 { any; }; | ||
+ | |||
+ | allow-query { any; }; | ||
+ | allow-transfer { trusted; }; | ||
+ | # | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== named.conf.local ===== | ||
+ | |||
+ | <file bash / | ||
+ | // | ||
+ | // Do any local configuration here. | ||
+ | // | ||
+ | |||
+ | |||
+ | acl slaves { | ||
+ | // 195.234.42.0/ | ||
+ | // 193.218.105.144/ | ||
+ | // 193.24.212.232/ | ||
+ | // 212.227.123.29; | ||
+ | // 192.168.1.26; | ||
+ | // 192.168.1.25; | ||
+ | }; | ||
+ | |||
+ | // Any IPs added here will not have ads blocked. | ||
+ | // For Virginia. | ||
+ | acl allow_ads { | ||
+ | // 192.168.1.64; | ||
+ | 192.168.1.70; | ||
+ | 192.168.1.75; | ||
+ | 192.168.1.90; | ||
+ | 192.168.1.96; | ||
+ | }; | ||
+ | |||
+ | acl internals { | ||
+ | 192.168.1.0/ | ||
+ | 192.168.50.0/ | ||
+ | 192.168.70.0/ | ||
+ | 172.16.0.0/ | ||
+ | !allow_ads; | ||
+ | 127.0.0.0/ | ||
+ | }; | ||
+ | |||
+ | view " | ||
+ | match-clients { allow_ads; }; | ||
+ | recursion yes; | ||
+ | |||
+ | // type forward; | ||
+ | // forwarders { | ||
+ | // 8.8.8.8; | ||
+ | // }; | ||
+ | |||
+ | include "/ | ||
+ | }; | ||
+ | |||
+ | view " | ||
+ | match-clients { internals; }; | ||
+ | recursion yes; | ||
+ | |||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-transfer { slaves; }; | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | |||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-transfer { slaves; }; | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | |||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-transfer { slaves; }; | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | |||
+ | # Set zone for reverse | ||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-transfer { slaves; }; | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | |||
+ | include "/ | ||
+ | include "/ | ||
+ | }; | ||
+ | |||
+ | view " | ||
+ | match-clients { any; }; | ||
+ | allow-query { any; };· | ||
+ | recursion no; | ||
+ | |||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-transfer { slaves; }; | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | |||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-transfer { slaves; }; | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | |||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-transfer { slaves; }; | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | |||
+ | # Set zone for reverse. | ||
+ | zone " | ||
+ | type master; | ||
+ | file "/ | ||
+ | allow-transfer { slaves; }; | ||
+ | allow-update { none; }; | ||
+ | }; | ||
+ | }; | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== ad-blacklist ===== | ||
+ | |||
+ | <file bind ad-blacklist> | ||
+ | // For more information about this list, see: https:// | ||
+ | // ---- | ||
+ | // last updated: | ||
+ | // entries: | ||
+ | // format: | ||
+ | // credits: | ||
+ | // this URL: http:// | ||
+ | // other formats: | ||
+ | |||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | zone " | ||
+ | ... | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | If a refreshed file is downloaded, the default file is points to may be **" | ||
+ | |||
+ | To change this to point to the **/ | ||
+ | : | ||
+ | </ | ||
+ | |||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Internals - ad-null.zone ===== | ||
+ | |||
+ | <file bind / | ||
+ | ; Ads get redirected to 127.0.0.1 | ||
+ | | ||
+ | $TTL 86400 | ||
+ | @ | ||
+ | | ||
+ | 86400 ; Refresh | ||
+ | 300 ; Retry | ||
+ | | ||
+ | 3600 ; Negative Cache TTL | ||
+ | ); | ||
+ | |||
+ | ; define the name server | ||
+ | IN NS ns1.sharewiz.net. | ||
+ | ; define the hostnames | ||
+ | @ | ||
+ | * | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Internals - 1.168.192.db ===== | ||
+ | |||
+ | <file bind / | ||
+ | ; sharewiz.net | ||
+ | $TTL 86400 | ||
+ | @ | ||
+ | | ||
+ | 3600 ; Refresh | ||
+ | 1800 ; Retry | ||
+ | 2419200 ; Expire | ||
+ | 86400 ; Negative Cache TTL | ||
+ | ); | ||
+ | |||
+ | ; define the name server | ||
+ | IN NS ns1.sharewiz.net.· | ||
+ | ns1 | ||
+ | |||
+ | ; define the range of this domain | ||
+ | IN PTR | ||
+ | IN A | ||
+ | |||
+ | ; define the hostnames | ||
+ | 1 | ||
+ | 1 | ||
+ | 2 | ||
+ | 2 | ||
+ | 2 | ||
+ | 2 | ||
+ | 2 | ||
+ | 2 | ||
+ | 10 IN PTR | ||
+ | 15 IN PTR | ||
+ | 69 IN PTR | ||
+ | 70 IN PTR | ||
+ | 80 IN PTR | ||
+ | 90 IN PTR | ||
+ | 99 IN PTR | ||
+ | 100 | ||
+ | |||
+ | ; define drdizzy.com | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | |||
+ | ; define magicalentertainmentandsound.com | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | </ | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Internals - db.sharewiz.net ===== | ||
+ | |||
+ | <file bind / | ||
+ | ; sharewiz.net | ||
+ | $TTL 86400 | ||
+ | @ | ||
+ | | ||
+ | 3600 ; Refresh | ||
+ | 1800 ; Retry | ||
+ | 2419200 ; Expire | ||
+ | 86400 ; Negative Cache TTL | ||
+ | ); | ||
+ | |||
+ | ; define the name server | ||
+ | IN NS ns1.sharewiz.net. | ||
+ | |||
+ | ; define the name server IP address | ||
+ | IN A | ||
+ | |||
+ | ; define the mail exchanger | ||
+ | IN MX 10 mail.sharewiz.net. | ||
+ | mail IN A | ||
+ | |||
+ | ; define the hostnames | ||
+ | gateway | ||
+ | router | ||
+ | ns1 | ||
+ | ftp | ||
+ | server1 | ||
+ | webmail | ||
+ | wiki IN A | ||
+ | www | ||
+ | ;www | ||
+ | * | ||
+ | @ | ||
+ | nas | ||
+ | switch | ||
+ | shield | ||
+ | peter | ||
+ | virginia | ||
+ | felix | ||
+ | felix2 | ||
+ | printer | ||
+ | extender | ||
+ | |||
+ | ; define the SPF | ||
+ | sharewiz.net. | ||
+ | ; | ||
+ | |||
+ | ; define the DMARC | ||
+ | ; | ||
+ | _dmarc.sharewiz.net. IN TXT " | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Externals - 35.134.42.5.db ===== | ||
+ | |||
+ | <file bind / | ||
+ | ; sharewiz.net | ||
+ | $TTL 86400 | ||
+ | @ | ||
+ | | ||
+ | 3600 ; Refresh | ||
+ | 1800 ; Retry | ||
+ | 2419200 ; Expire | ||
+ | 86400 ; Negative Cache TTL | ||
+ | |||
+ | ); | ||
+ | |||
+ | ; define the name server | ||
+ | ; IN NS ns1.server1.net. | ||
+ | IN NS ns1.sharewiz.net. | ||
+ | ns1 | ||
+ | ; IN NS ns1.drdizzy.com. | ||
+ | |||
+ | ; define the range of this domain | ||
+ | IN PTR | ||
+ | ; IN A | ||
+ | |||
+ | ; define the hostnames | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | |||
+ | ; define drdizzy.com | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | |||
+ | ; define magicalentertainmentandsound.com | ||
+ | IN PTR | ||
+ | IN PTR | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Externals - db.sharewiz.net ===== | ||
+ | |||
+ | <file bash / | ||
+ | ; sharewiz.net | ||
+ | $TTL 86400 | ||
+ | @ | ||
+ | | ||
+ | 3600 ; Refresh | ||
+ | 1800 ; Retry | ||
+ | 2419200 ; Expire | ||
+ | 86400 ; Negative Cache TTL | ||
+ | ); | ||
+ | |||
+ | ; define the name server | ||
+ | IN NS ns1.sharewiz.net. | ||
+ | ; | ||
+ | |||
+ | ; define the name server IP address | ||
+ | IN A | ||
+ | |||
+ | ; define the mail exchanger | ||
+ | IN MX 10 mail.sharewiz.net. | ||
+ | mail IN A | ||
+ | |||
+ | ; define the hostnames | ||
+ | ns1 | ||
+ | ftp | ||
+ | router | ||
+ | server1 IN A | ||
+ | webmail IN A | ||
+ | www | ||
+ | ;www | ||
+ | *» IN»· | ||
+ | |||
+ | ; define the SPF | ||
+ | sharewiz.net.»IN»·TXT»" | ||
+ | ; | ||
+ | |||
+ | ; define the SenderID | ||
+ | ; | ||
+ | |||
+ | ; define the DMARC | ||
+ | ; | ||
+ | _dmarc.sharewiz.net. IN TXT " | ||
+ | </ | ||
ubuntu/bind/configure_bind9/my_configuration.1607522316.txt.gz · Last modified: 2020/12/09 13:58 by peter