DNS

From Bashlinux
Revision as of 00:35, 19 June 2015 by Manpaz (talk | contribs) (Created page with "__NOTOC__ === 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. Bot...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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