DNS

I have a little network at home, which has an old PC running SuSE 9.0.

This machine serves 4 primary purposes:

  • Caching Squid HTTP proxy for the family PC.
    This also double as a filter for sites of a dubious nature, which I configured using this guy's setup.
  • Tier 3 NTP server for the hosts on my home network
  • Samba file system so I can backup valuable data from the family PC
  • As a training area for me to learn more about Linux!

Anyway, it suddenly occurred to me that I might be able to speed up DNS lookups by implementing a caching DNS server on this machine, so off I went and installed the bind and SuSE Yast DNS server packages using yast2 (which has a pleasingly simple, yet effective UI) and proceeded to try to get it working.

Using yast2, I was able to get DNS configured in "stub" mode easily, but couldn't get nslookup to work from my Sun box. After some considerable time spent researching the problem, I finally figured out that named on the SuSE box was not able to do a reverse lookup (ie get name from IP address) for itself. So, I copied the entry for 127.0.0.1 in named.conf and changed it appropriately:

zone "254.168.192.in-addr.arpa" in {
	type master;
	file "192.168.254.zone";
};<

Then I created the zone file: 192.168.254.zone:

$TTL 1W
@		IN SOA		gimboid2.   root.gimboid2. (
				42		; serial (d. adams)
				2D		; refresh
				4H		; retry
				6W		; expiry
				1W )		; minimum

		IN NS		gimboid2.
104		IN PTR		gimboid2.

I'm rather chuffed with myself that I actually got it working. However, since this was a hack to get things going, I haven't checked whether the parameters in the zone file are correct, but nslookup on my Solaris box sprang into life once I'd made these changes and restarted named. I shall be researching DNS further to tweak the configuration and thereby (hopefully) prevent me from having to rely on BT's occasionally flakey DNS servers. Whilst it's slower to lookup uncached hosts, I'm hoping that once the majority of sites we use are cached, it will be a lot quicker.

Comments:

Post a Comment:
Comments are closed for this entry.
About

tdw

Search

Top Tags
Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today