On Mon, Nov 24, 2008 at 08:57:51PM +0000, mbm wrote:
On Mon, 24 Nov 2008 17:34:21 +0000 Chris G cl@isbd.net allegedly wrote:
Yes, I can get my router to do that but it doesn't give a name to the MAC address does it. My current /etc/hosts file is:-
192.168.1.1 vigor 2820n 192.168.1.4 home.isbd.net home
84-45-228-40.no-dns-yet.enta.net 192.168.1.5 chris 192.168.1.6 maxine 192.168.1.7 nas garage 192.168.1.44 hp7310 HPEDDBB7 HP000D9D068F7D 192.168.13.254 2wire BT2700HGV gateway.2wire.net
I'd really prefer not to have to copy that to every system. I'm sure I once had a router that actually had a DNS server in it where I could have stored the above but neither of my current routers (two ADSL lines, hence the vigor *and* 2wire above) has this ability.
Use DNSmasq. Set up one of the mcahines as a DNS server and point all the others at that for resolution. The DNSmasq server can use a single local hosts file to resolve all internal local addresses (usually from RFC 1918) and forward to a downsteram server at your ISP for any non-local addresses.
One useful side effect of this approach is that you can tack on to the hosts file a list of known "bad" hosts (such as the one at http://someonewhocares.org/hosts/. This will then block any connections to cruddy porn/malware/warez/advertising sites listed.
Oh and DNSMasq will act as a DHCP server and can allocate "static" addresses according to MAC addresses mapped in the local /etc/ethers.
Of course you will have to turn off DHCP from any routers on your network or you may get some funny results.
Sounds just what I want, thanks!