DNS
From Bashlinux
How to setup a local cache DNS
The idea is to setup a local cache to forward all the DNS requests to the proper DNS resolver on each remote collocation.
Both, DNS server and nodes are reachable through VPN.
- Setup the local server as VPN client of each location
- Install bind-chroot
- Create a chrooted configuration location
- Copy the proper files and edit them
# cp /usr/share/doc/bind-*/sample/etc/named.conf /var/named/chroot/etc/ # cp /usr/share/doc/bind-*/sample/etc/named.rfc1912.zones /var/named/chroot/etc/
- Add the forward and reverse zone for each location on named.conf, ie:
zone "east.bashlinux.com" in { type forward; forwarders { 10.20.30.1; }; forward only; }; zone "30.20.10.in-addr.arpa" in { type forward; forwarders { 10.20.30.1; }; forward only; };
- Flush the current DNS cache
# service nscd reload