Install bind
# apt-get install bind
Put the following on /etc/bind/named.conf
# cat /etc/bind/named.conf //#g0 - 2012 include "/etc/bind/named.conf.options"; include "/etc/bind/named.conf.local";
Put the following on /etc/bind/named.conf.options
and replace 10.27.224.17 with your IP address.
# cat /etc/bind/named.conf.options options { directory "/var/cache/bind"; version "awmn. #g0 2012 alog.ipduh.com"; listen-on { 127.0.0.1; 10.27.224.17; }; auth-nxdomain no; # conform to RFC1035 };
Put something like the following in /etc/bind/named.conf.local
Replace 224.27.10.in-addr.arpa with your reverse DNS zone
# cat named.conf.local //g0 2012 http://ipduh.com/contact // Consider adding the 1918 zones here, if they are not used in your // organization //include "/etc/bind/zones.rfc1918"; acl internals { 127.0.0.0/8; 10.0.0.0/8; }; view "internal" { match-clients { internals; }; recursion yes; allow-recursion { any; }; allow-query { any; }; allow-query-cache { any; }; // be authoritative for the localhost forward and reverse zones, and for // broadcast zones as per RFC 1912 zone "localhost" { type master; file "/etc/bind/db.local"; }; zone "127.in-addr.arpa" { type master; file "/etc/bind/db.127"; }; zone "0.in-addr.arpa" { type master; file "/etc/bind/db.0"; }; zone "255.in-addr.arpa" { type master; file "/etc/bind/db.255"; }; //10.27.224.0/24 reverse zone zone "224.27.10.in-addr.arpa" IN { type master; file "/var/cache/bind/db.224.27.10.in-addr.arpa"; allow-update { none; }; }; zone "10.in-addr.arpa" IN { type forward; forwarders { //10.0.1.1; 10.19.143.12; //10.19.143.13; }; }; //#################################### //# Greek Wireless Communities Zones # //#################################### //# https://www.awmn.net/wiki/ # //#################################### //Because awmn will go gwmn pretty soon g stands for Greek or Global ;) //#################################### zone "awmn" IN { type forward; forwarders { //10.0.1.1; 10.19.143.12; //10.19.143.13; }; }; zone "wn" IN { type forward; forwarders { 10.126.3.115; 10.110.17.115; 10.19.143.12; 10.17.122.134; 10.86.87.129; 10.2.16.130; 10.110.17.67; }; }; zone "swn" IN { type forward; forwarders { 10.101.0.254; 10.106.3.1; 10.174.254.101; 10.174.1.253; }; }; zone "twmn" IN { type forward; forwarders { 10.104.76.65; 10.122.20.70; 10.122.3.68; 10.122.14.72; 10.104.1.74; }; }; zone "wthess" IN { type forward; forwarders { 10.96.0.1; 10.96.22.2; 10.96.9.3; }; }; zone "ewn" IN { type forward; forwarders { 10.145.7.150; 10.146.210.130; }; }; zone "mswn" IN { type forward; forwarders { 10.148.50.2; }; }; zone "cywn" IN { type forward; forwarders { 10.215.0.125; 10.215.2.126; }; }; zone "dwn" IN { type forward; forwarders { 10.174.1.253; 10.174.254.101; 10.174.17.250; }; }; zone "wiran" IN { type forward; forwarders { 10.230.3.133; }; }; zone "wana" IN { type forward; forwarders { 10.224.3.35; }; }; zone "awn" IN { type forward; forwarders { 10.198.0.130; }; }; zone "pwmn" IN { type forward; forwarders { 10.140.14.67; }; }; // prime the server with knowledge of the root servers zone "." { type hint; file "/etc/bind/db.root"; }; };
Then put the zone info for 224.27.10.in-addr.arpa ( our example reverse zone ) at /var/cache/bind/db.224.27.10.in-addr.arpa or another appropriately named file
# cat /var/cache/bind/db.224.27.10.in-addr.arpa $ORIGIN 224.27.10.in-addr.arpa. $TTL 86400 @ IN SOA ns1.geioa.ns.awmn. systems-awmn.bot.ipduh.com. ( 2012122501 ; serial 21600 ; refresh after 6 hours 3600 ; retry after 1 hour 604800 ; expire after 1 week 86400 ) ; minimum TTL of 1 day IN NS ns1.geioa.ns.awmn. 1 IN PTR router.geioa.ns.awmn. 17 IN PTR serverakos.geioa.ns.awmn.
Then restart bind
# /etc/init.d/bind9 restart
AWMN public hybrid caching DNS and PTR server