[Hampshire] How to make linux server accessible via hostname…

Top Page

Reply to this message
Author: Robin Wilson
Date:  
To: Hampshire LUG Discussion List
Subject: [Hampshire] How to make linux server accessible via hostname on home LAN
Hi everyone,

Thanks to the useful replies I got from this mailing list about setting up a home server, I now have a nice new server that I've been configuring today :-) Everything is going really well, I just have one question. I have a home network running from an off-the-shelf broadband router which has a couple of wired clients on it, and a number of wireless clients. At the moment I am accessing my server via ssh using the IP address (192.168.2.3), but I'd like to be able to access it via its hostname (which is, appropriately, SERVER). I'd also like to be able to do this for Samba connections (that is, connect with \\SERVER\sharename rather than \\192.168.2.3\\sharename).

How should I go about doing this?

I know that I need to have some sort of Domain Name Resolution going on to convert SERVER to the right IP. The problem is that I'm using DHCP, and my router (silly rubbishy router that it is) doesn't allow me to fix certain devices to certain DHCP allocated addresses. I assume this means I can't just add entries to the /etc/hosts file, as the IP addresses may well change. Also, my network is running a mix of linux, OS X and Windows clients, and I assume /etc/hosts doesn't exist on Windows.

I'm sure I've seen people who've had this working before. Is there a way of using the router itself as a nameserver? If so, how should I set this up? I notice that when I view the list of attached devices in the router configuration interface, all of the IP addresses have hostnames next to them apart from my new server. Any idea why this is?

Sorry for the rather vague questions - I'm hoping someone here can help,

Cheers,

Robin