Skip to content

Instantly share code, notes, and snippets.

@adhawkins
Created August 6, 2017 16:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adhawkins/1037b0efbaf4c53db46764ce8030982e to your computer and use it in GitHub Desktop.
Save adhawkins/1037b0efbaf4c53db46764ce8030982e to your computer and use it in GitHub Desktop.
root@xcp-gateway:~# cat /etc/bind/named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz 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
acl internals
{
127.0.0.0/8;
192.168.202.0/24;
::1;
};
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
root@xcp-gateway:~# cat /etc/bind/named.conf.options
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
# query-source port 53;
// 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.
recursion yes;
//Use OpenDNS
forwarders {
# 208.67.222.222; //OpenDNS
# 208.67.220.220; //OpenDNS
# 194.168.4.100; //Virgin
# 194.168.8.100; //Virgin
8.8.8.8; //Google
};
//========================================================================
// 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;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
allow-query
{
internals;
};
allow-recursion
{
internals;
};
allow-query-cache
{
internals;
};
version none;
};
logging {
channel query-chan
{
# null;
file "/var/log/bind/query.log" versions 5 size 500k;
print-time yes;
severity debug 3;
};
# category queries { query-chan; };
# category general { query-chan; };
# category config { query-chan; };
category resolver { query-chan; };
# category client { query-chan; };
# category unmatched { query-chan; };
# category network { query-chan; };
# category dispatch { query-chan; };
};
root@xcp-gateway:~# cat /etc/bind/named.conf.local
//
// 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 "gently.org.uk" {
type master;
notify no;
file "/etc/bind/db.gently";
};
zone "202.168.192.in-addr.arpa" {
type master;
notify no;
file "/etc/bind/db.202.168.192";
};
root@xcp-gateway:~# cat /etc/bind/named.conf.default-zones
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment