(Created page with " == BIND DNS Server == [https://www.isc.org/downloads/bind/| BIND] is the most widely used Linux Name Server software. It implements Domain Name Systems (DNS) protocols. Dow...") |
(→BIND DNS Server) |
||
Line 19: | Line 19: | ||
acl localnet { | acl localnet { | ||
192.168.0.0/24; | 192.168.0.0/24; | ||
+ | 2003:44b9:4219:6400::/64; | ||
localhost; | localhost; | ||
}; | }; | ||
Line 32: | Line 33: | ||
allow-query { localnet; }; | 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"; | ||
+ | }; | ||
+ | </PRE> | ||
+ | |||
+ | |||
+ | Create a file called /etc/bind/db.127 with the following contents: | ||
+ | <PRE> | ||
+ | ; | ||
+ | ; 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. | ||
+ | </PRE> | ||
+ | |||
+ | Create a file called /etc/bind/db.192 with the following contents: | ||
+ | <PRE> | ||
+ | ; | ||
+ | ; 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. | ||
</PRE> | </PRE> |
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"; };
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.