setting up bind/dns on a little network PDF Print E-mail
Friday, 28 October 2005
DNS/BIND little network howto basically a listing of all necessary config files to set up bind/dns on a little network

this should not be a lengthily HOWTO, i would simply list all config files which need to be changed to set up DNS/BIND correctly...

first the machines in my network:

Hostname

IP

description

zaphod.krikkit

192.168.0.1

the internet gateway, eth0 is connected to the internet, eth1 is the internal network, my BIND runs here

marvin.krikkit

192.168.0.6

a simple client

krikkit.krikkit

192.168.0.5

a simple client

andi.krikkit

192.168.0.7

another simple client

 

now lets look at the config files:

 

let us start with /etc/names.conf

options {
directory "/var/named";
// change this to the ip's of your isp's dns-servers
forwarders { 195.34.133.11; 195.34.133.10; 195.3.96.67; };
forward first;
notify no;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};
logging {
category queries { null; };
category lame-servers { null; };
};
         // a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
// my zones....
zone "krikkit" in {
type master;
file "db.krikkit";
};
zone "0.168.192.in-addr.arpa" in {
type master;
file "db.192.168.0";
};
         include "/etc/rndc.key";
     

 

now the file db.krikkit in the /var/named directory

$TTL 3h
krikkit. IN SOA server.krikkit. root.localhost. (
1999100502 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; default_ttl
)
krikkit. IN NS server.krikkit.
localhost.krikkit. IN A 127.0.0.1
server.krikkit. IN A 192.168.0.1
zaphod.krikkit. IN A 192.168.0.1
krikkit.krikkit. IN A 192.168.0.5
marvin.krikkit. IN A 192.168.0.6
andi.krikkit. IN A 192.168.0.7

 

db.192.168.0 in the /var/named directory

$TTL 3h
0.168.192.in-addr.arpa. IN SOA server.krikkit. root.localhost. (
1999100511 ; serial
28800 ; refresh
14400 ; retry
3600000 ; expire
86400 ; default_ttl
)
; Nameserver:
;
0.168.192.in-addr.arpa. IN NS server.krikkit.
; Adressen zeigen auf kanonische Namen
;
1.0.168.192.in-addr.arpa. IN PTR server.krikkit.
5.0.168.192.in-addr.arpa. IN PTR krikkit.krikkit.
6.0.168.192.in-addr.arpa. IN PTR marvin.krikkit.
7.0.168.192.in-addr.arpa. IN PTR andi.krikkit.

 

localhost.zone in the /var/named directory

$TTL 86400
$ORIGIN localhost.
@ 1D IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
 1D IN NS @
1D IN A 127.0.0.1

 

named.local in the /var/named directory

$TTL 2D
@ IN SOA localhost. root.localhost. (
42 ; serial (d. adams)
1D ; refresh
2H ; retry
1W ; expiry
2D ) ; minimum
 IN NS localhost.          1 IN PTR localhost.         

you could leave named.ca like it is, so i won't show it here.

now you should also change /etc/resolv.conf to use your named

/etc/resolv.conf

search krikkit
nameserver 192.168.0.1
; just a few backup servers
nameserver 195.34.133.11
nameserver 195.34.133.10
nameserver 195.3.96.67

also quite interesting is the /etc/hosts file ;-)

[root@zaphod named]# more /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 zaphod.skynet zaphod

 

this should be the most important files, i hope i missed nothing, if so please tell me...

Last Updated ( Friday, 28 October 2005 )
 
< Prev   Next >
© 1999 - 2008 Gerald Haider, Vienna . All trademarks and copyrights on this page are owned by their respective owners.