(BIND DNS Server)
(BIND DNS Server)
Line 25: Line 25:
 
options {
 
options {
 
directory "/var/cache/bind";
 
directory "/var/cache/bind";
#      fowarders { 192.231.203.132; 192.231.203.3 }
+
#      fowarders { 192.231.203.132; 192.231.203.3 };
 
dnssec-validation auto;
 
dnssec-validation auto;
 
auth-nxdomain no;
 
auth-nxdomain no;
 
         listen-on port 53 { 127.0.0.1; 192.168.0.254; }
 
         listen-on port 53 { 127.0.0.1; 192.168.0.254; }
listen-on-v6 { any; };
+
listen-on-v6 { 2001:44b9:4219:6400:250:43ff:fe01:835e; };
 
recursion yes;
 
recursion yes;
 
allow-query { localnet; };
 
allow-query { localnet; };
Line 98: Line 98:
 
604800 ) ; Negative Cache TTL
 
604800 ) ; Negative Cache TTL
 
;
 
;
NS
+
NS gateway
 
gateway A 192.168.0.254
 
gateway A 192.168.0.254
 
nas A 192.168.0.253
 
nas A 192.168.0.253
 
</PRE>
 
</PRE>

Revision as of 10:23, 4 July 2015

BIND DNS Server

BIND is the most widely used Linux Name Server software. It implements Domain Name Systems (DNS) protocols.

Download, build and install:

wget http://ftp.isc.org/isc/bind9/9.9.7/bind-9.9.7.tar.gz
tar -xzf bind-9.9.7.tar.gz
./configure --prefix= --host=arm-linux-gnueabi --sysconfdir=/etc --without-openssl --with-randomdev=no BUILD_CC=gcc
make
make install DESTDIR=/home/export/rootfs

Create a configuration file /etc/bind/named.conf with the following contents:

acl localnet {
	192.168.0.0/24;
        2003:44b9:4219:6400::/64;
	localhost;
};

options {
	directory "/var/cache/bind";
#       fowarders { 192.231.203.132; 192.231.203.3 };
	dnssec-validation auto;
	auth-nxdomain no;
        listen-on port 53 { 127.0.0.1; 192.168.0.254; }
	listen-on-v6 { 2001:44b9:4219:6400:250:43ff:fe01:835e; };
	recursion yes;
	allow-query { localnet; };
};

zone "0.0.127.in-addr.arpa" in {
        type master;
        file "/etc/bind/db.127";
};

zone "0.168.192.in-addr.arpa" {
  	type master;
	file "/etc/bind/db.192";
};

zone "home" IN {
  	type master;
	file "/etc/bind/home.zone";
};


Create a file called /etc/bind/db.127 with the following contents:

;
; BIND reverse data file for local loopback interface
;
$TTL	604800
@	IN	SOA	localhost. root.localhost. (
			      1		; Serial
			 604800		; Refresh
			  86400		; Retry
			2419200		; Expire
			 604800 )	; Negative Cache TTL
;
@	IN	NS	localhost.
1.0.0	IN	PTR	localhost.

Create a file called /etc/bind/db.192 with the following contents:

;
; BIND reverse data file for local subnet 192.168.0
;
$TTL    604800
@       IN      SOA     gateway.home. webuser.gateway.home. (
			      2		; Serial
			 604800		; Refresh
			  86400		; Retry
			2419200		; Expire
			 604800 )	; Negative Cache TTL
;
@       IN      NS  gateway.
254     IN      PTR gateway.home.

Create a file called /etc/bind/home.zone with the following contents:

;
; BIND data file for home domain
;
$TTL	604800
@	IN	SOA	home. root.home. (
			      2		; Serial
			 604800		; Refresh
			  86400		; Retry
			2419200		; Expire
			 604800 )	; Negative Cache TTL
;
		NS	gateway
gateway		A	192.168.0.254
nas		A	192.168.0.253