Wednesday Dec 22, 2004

A bit of a Samba nightmare

Our old PII-500 PC is now in service as the server for the house, but running Linux (SuSE 9.1).

It's been working well for quite some time now as:

      
  • Tier-3 NTP server
  •   
  • Caching Web Proxy/filter (Squid)
  •   
  • Shared File-system (Samba)
  •  

A few weeks ago, it also got pressed into service as a caching DNS server, although I'm not entirely convinced that it is any faster than lookups of our ISP's DNS servers.

Anyway, back to the point of the story....
Last week, the PC stopped seeing the Samba file-system on the Linux box. It had previously been listing two entries for it in the Network Neighbourhood, but this dropped to one, and that didn't actually contain a correct view of the shared file-system. I rebooted the PC a couple of times in the hope that this would clear it, but to no avail. The wierdest thing was that one of the PC applications claimed that it was backing up to the shared filesystem on the Linux host, yet no file update was taking place actually on the host!!!!

Yesterday, I decided it was time to investigate further. So, having manually removed the 'NetHood' folder from my 'Documents and Settings' tree on the PC, I found that the PC couldn't actually see the shared file-system at all. In fact, any attempt to reference the Linux box by its WinNS name failed. I then spent a couple of fruitless hours investigating the settings in /etc/sambas/smb.conf, DNS and other wierd and wonderful stuff, only to discover that the Samba name-service daemon (nmd) was not running. D'oh!!! Once this was restarted, the PC immediately 'found' the shared filesystem and I was back in business.  nmd did subsequently die another time, but it appears to be stable now, and everything is working okay. The PC only reports one copy of the system too, so that's a good improvement.

I must say that I like Samba, although I can't claim to be that knowledgeable in it. It would be nice if there was an smbfs module for Solaris to make it easier for me to access file-systems on the PC too, but that's a nice-to-have and I can just about manage by copying files to the Linux server.

Thursday Dec 02, 2004

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.

About

tdw

Search

Top Tags
Categories
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