< Day Day Up > |
Recipe 24.12. Building a Private tinydns Server24.12.1 ProblemYou've outgrown hosts files, so you want to use a DNS server for your LAN only. You won't be providing any public services. How do you do this with tinydns? 24.12.2 SolutionSet up a dnscache server for your LAN, as in Recipe Recipe 24.9. Set up a tinydns server as in Recipe 24.11, and enter your internal hosts in /etc/tinydns/root/data. Using the pixels.net domain to illustrate, the next step is to tell your local dnscache to query your local, private tinydns server for your domain information. Create these files using the IP address of your private tinydns server: # echo 192.168.1.100 > /service/dnscache/root/servers/pixels.net # echo 192.168.1.100 > /service/dnscache/root/servers/0.168.192.in-addr.arpa The dnscache user should own these files: # chown dnscache: /service/dnscache/root/servers/pixels.net # chown dnscache: /service/dnscache/root/servers/0.168.192.in-addr.arpa Next, restart dnscache: # svc -t /service/dnscache dnscache will now consult the local tinydns server for local addresses, and it will consult the /service/dnscache/root/servers/@ file for external addresses. 24.12.3 DiscussionYou can easily do this for multiple domains; just add more domain files to /service/dnscache/root/servers/. You have to have officially registered domain names for this to work, even if you are not running any public services. If you want the ability to invent whatever domain names you want for your LAN, see Recipe Recipe 24.2. Remember that dnscache and tinydns should be on separate machines. Always separate the caching/resolving server from the authoritative server. If you must put them on the same machine, give them separate IP addresses. tinydns can have 127.0.0.1, and dnscache can take the network IP address. 24.12.4 See Also
|
< Day Day Up > |