//Only these servers can ask questions.
# acl "home" { 10.0.0.0/24; 127.0.0.1; };
// If this file doesn't exist, I'll explain it later. It must be included.
include "/etc/rndc.key";
acl lan {
192.168.0.0/24;
127.0.0.1;
};
options {
//Where all your DNS info is stored
directory "/etc/bind/";
#"/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
allow-query {
127.0.0.1;
192.168.0.0/24;
};
#{ "home"; };
//If named doesn't know, it will eithe ask one of these,
//Or shoe the client to it
forwarders {
68.87.71.226;
68.87.71.242;
};
recursion yes;
};
//This allows dhcpd to update your DNS. Change accordingly
//if you have dhcpd on a different server.
controls {
inet 127.0.0.1 port 953 allow {
localhost;
127.0.0.1;
192.168.0.99;
lan;
}
keys {
"rndc-key";
};
};
//This is the zone where your DHCPD will do its updating.
//Change example.com to the name of your network
zone "mydomain.com" {
type master;
notify no;
//For sanity's sake, change it to something related
//Mine is wm161.zone.
file "/etc/bind-zone/clients.zone";
# allow-update {
# 127.0.0.1;
# lan;
# key "rndc-key";
# };
update-policy {
grant 192.168.0.99 name Iron-Eagle A TXT;
};
};
//This is for reverse DNS lookups
//Eg: # nslookup jupiter returns 10.0.0.1
zone "0.0.10.in-addr.arpa" {
type master;
notify no;
file "/etc/bind-zone/clients.zone.rev";
allow-update {127.0.0.1; lan; key "rndc-key"; };
};
// These zones came with the fedora install.
// None are required, but why fix something
// that ain't broke?
zone "localhost" IN {
type master;
file "/etc/bind-zone/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "/etc/bind-zone/named.local";
allow-update { none; };
};
zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
type master;
file "/etc/bind-zone/named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "/etc/bind-zone/named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "/etc/bind-zone/named.zero";
allow-update { none; };
};
// This is for looking up the root nameservers.
zone "." {
type hint;
file "/etc/bind-zone/named.ca";
};
-------------------------------------------------------
# Basic stuff to name the server and switch on updating
server-identifier 192.168.0.99;
ddns-updates on;
ddns-update-style interim;
ddns-domainname "mydomain.";
ddns-rev-domainname "in-addr.arpa.";
ignore client-updates;
# This is the key so that DHCP can authenticate it's self to BIND9
include "/etc/rndc.key";
# This is the communication zone
zone mydomain. {
primary 127.0.0.1;
key rndc-key;
}
# Normal DHCP stuff
option domain-name "mydomain.";
option domain-name-servers 192.168.0.60, 192.168.0.1;
option ntp-servers 192.168.0.60;
option ip-forwarding off;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;
subnet 192.168.0.0 netmask 255.255.255.0 {
range 192.168.0.100 192.168.0.200;
option broadcast-address 192.168.0.255;
option routers 192.168.0.1;
allow unknown-clients;
zone 0.168.192.in-addr.arpa. {
primary 192.168.0.60;
key "rndc-key";
}
zone localdomain. {
primary 192.168.0.60;
key "rndc-key";
}
}
---------------------------------------------------------------
/etc/bind-zone/mydomain.hosts
$ttl 38400
mydomain. IN SOA Iron-Eagle. hikenboot.yahoo.com. (
1164594648
10800
3600
604800
38400 )
mydomain. IN NS Iron-Eagle.
-----------------------------------------------------------------
clients.zone
$ORIGIN .
$TTL 10 ; 10 seconds
mydomain.com IN SOA mydomain.com 192.168.0.99 (
18 ; serial
10800 ; refresh (3 hours)
3600 ; retry (1 hour)
604800 ; expire (1 week)
10 ; minimum (10 seconds)
)
IN NS 192.168.0.99
Iron-Eagle.mydomain.com IN A 192.168.0.99
------------------------------------------------
clients.zone.rev
;
; SOA section: like above only maps addresses to names.
;
$ORIGIN .
$TTL 86400 ; 1 day
0.168.192.in-addr.arpa IN SOA mydomain.com. Iron-Eagle.mydomain.com. (
2000107274 ; serial
28800 ; refresh (8 hours)
14400 ; retry (4 hours)
3024000 ; expire (5 weeks)
86400 ; minimum (1 day)
)
;
; Name Servers
;
IN NS Iron-Eagle.mydomain.com.
;
; Fixed addresses, followed by DDNS inserted mappings.
;
99.0.168.192.in-addr.arpa. PTR Iron-Eagle.mydomain.com.