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 { any; }; 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 A 192.168.0.254 nas A 192.168.0.253