[Dnsmasq-discuss] Question about /etc/hosts and problem with Ubuntu 10.10

Chris G cl at isbd.net
Mon Mar 21 10:16:40 GMT 2011


On Sun, Mar 20, 2011 at 07:19:22PM +0000, Chris G wrote:
[snip]
Well I've fixed the basic problem, I've uninstalled Network Manager and
installed wicd instead, now my /etc/hosts is left alone and so the
immediate problem is solved.

However I'd still like an answer to the first question:-
> 
> 
> So, two questions:-
> 
> 1 - Are my /etc/hosts files OK (without the Network Manager changes that
>     is)?  I.e. is what I have the correct way to get what I want?
> 
To be more complete/explicit.

This is a small SoHo LAN behind a NAT router, it has a static IP and I
have a domain (zbmc.eu) which points to it.  The router allows incoming
SMTP, HTTP and ssh connections.  There are several machines in the LAN
behind the router, the router is 192.168.1.1, the dnsmasq server runs on
machine 'dps' which is 192.168.1.2 and its /etc/hosts is:-

    127.0.0.1       localhost

    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters
    ff02::3 ip6-allhosts
    #
    #
    # Systems with static addresses, dnsmasq distributes these to the others
    #
    192.168.1.1 vigor 2820n
    192.168.1.2 dps dps.zbmc.eu
    192.168.1.3 hp7310 HPEDDBB7 HP000D9D068F7D
    192.168.1.4 chris mws boat info
    192.168.13.254 2wire BT2700HGV gateway.2wire.net

Incoming SMTP conenctions go to 192.168.1.2, HTTP and ssh go to
192.168.1.4 (done by firewall/routing tables in the router).

Is the above correct/OK for what I want?  There's virtually nothing
non-default in /etc/dnsmasq.conf, just one dhcp-host= mapping for a NAS
that doesn't give its name out when using dnsmasq's DHCP.

All the other machines on the LAN (including the one that I had problems
with until removing Network Manager) have an /etc/hosts file as follows:-

    127.0.0.1       localhost

    # The following lines are desirable for IPv6 capable hosts
    ::1     localhost ip6-localhost ip6-loopback
    fe00::0 ip6-localnet
    ff00::0 ip6-mcastprefix
    ff02::1 ip6-allnodes
    ff02::2 ip6-allrouters


The one important requirement is that the machine chris (192.168.1.4)
can find its domain name correctly as both apache2 and leafnode complain
otherwise.  (This was what Network Manager was breaking by modifying
/etc/hosts). 

Any/all feedback (within reason!) would be welcome.

Oh, nearly all the machines are running xubuntu or ubuntu 10.04, except
'chris' which is now 10.10.

-- 
Chris Green



More information about the Dnsmasq-discuss mailing list