[Dnsmasq-discuss] Question about /etc/hosts and problem with Ubuntu 10.10
Chris G
cl at isbd.net
Sun Mar 20 19:19:22 GMT 2011
I have a small SoHo LAN on which I run dnsmasq 2.52 on one of the
machines (dps, 192.168.1.2) to provide DHCP and DNS. There are some
static IP addresses on the LAN and thus the /etc/hosts on the machine
where dnsmasq runs is 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
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
I'm having a problem with the machine 'chris', 192.168.1.4, since I
upgraded it to xubuntu 10.10 (all other machines are still at 10.04).
After the upgrade something (Network Manager I guess) insists on
changing the /etc/hosts file to the following:-
127.0.0.1 chris localhost.localdomain localhost
::1 chris localhost6.localdomain6 localhost6
# 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
... up until the 10.10 upgrade my /etc/hosts was:-
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
which worked perfectly. However with the Network Manager changes the
machine 'chris' doesn't think it has a proper domain and apache2 and
leafnode complain about there not being a valid domain.
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?
2 - Can anyone suggest a workaround to prevent Network Manager
overwriting /etc/hosts or a way to change /etc/hosts so dnsmasq will
still work correctly in spite of the Network Manager changes.
--
Chris Green
More information about the Dnsmasq-discuss
mailing list