# sudo -s # cat /etc/issue Ubuntu 12.04.2 LTS \n \l
# apt-get install bind9
Change /etc/bind/named.conf , /etc/bind/named.conf.local , /etc/bind/named.conf.options
# cat /etc/bind/named.conf // g0 2013 AWMN+Internet caching dns include "/etc/bind/named.conf.options"; include "/etc/bind/named.conf.local";
# cat /etc/bind/named.conf.options options { directory "/var/cache/bind"; //dnssec-validation auto; listen-on { 127.0.0.1; 10.46.78.6; }; version "some version alog.ipduh.com "; auth-nxdomain no; # conform to RFC1035 allow-query { 10.0.0.0/8; localhost; }; allow-recursion { 10.0.0.0/8; localhost; }; //listen-on-v6 { any; }; };
# cat /etc/bind/named.conf.local // #g0 2013 AWMN+Internet Caching DNS 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"; }; //#################################### //# Greek Wireless Communities Zones # //#################################### //# https://www.awmn.net/wiki/ # //#################################### //Because awmn will go gwmn pretty soon g stands for Greek or Global ;) //#################################### zone "10.in-addr.arpa" IN { type forward; forwarders { 10.0.0.1; 10.19.143.12; 10.19.143.13; }; }; zone "awmn" IN { type forward; forwarders { 10.0.0.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"; };
Deal with the ubuntu resolv.conf madness
# echo "nameserver 127.0.0.1" > /etc/resolvconf/resolv.conf.d/base # cd /etc/resolvconf/resolv.conf.d/ # cp base tail # cp tail original # cp base /etc/resolv.conf
# /etc/init.d/bind9 restart
Test
# dig voip.awmn +short 10.67.0.17 # dig www.awmn +short srv1.awmn. 10.19.143.13 # dig ipduh.org +short 85.25.242.245 # dig ipduh.awmn +short 10.21.241.4
Yet another AWMN hybrid caching DNS server - Ubuntu 12.04