Central hostname management

Chris Green cl at isbd.net
Wed Jun 4 09:34:04 UTC 2014


On Wed, Jun 04, 2014 at 07:46:53AM +0200, Niki Kovacs wrote:
> 
> Now I can't seem to replicate this behaviour with Ubuntu. On the
> desktop PCs I've removed the network-manager package, to replace it
> by a "classic" configuration using /etc/network/interfaces, but I
> can't seem to get this to work.
> 
It's quite difficult to get a 'real' dnsmasq running on [x]ubuntu
because Network Manager (which you say you have removed) comes with a
cut down dnsmasq which it uses to provide local (i.e. machine only)
DNS.


I went through this exercise recently and sent the following outline
of what needs doing to the dnsmasq mailing list:

======dnsmasq======

To use a 'proper' dnsmasq instead of the dnsmasq-base package that provides local DNS
and is run by NetworkManager the following steps are needed:-

==1 - Install the dnsmasq package==
The dnsmasq-base package will already be installed bur you can't remove it because
it's a dependency of NetworkManager, just leave it.

==2 - Change to a static IP==
The simplest way to do this is simply to do it by clicking on the NetworkManager
applet and set the IPV4 addressing to 'manual'.  I don't think there's any need
to set the DNS server IP here.

==3 - Edit the Network Manager configuration==

In directory /etc/NetworkManager/system-connections there will be a file 'Wired connection 1',
edit the dns line in this file to point to localhost plus real DNS servers:-

    dns=127.0.0.1;212.159.6.9;212.159.13.49;

There may be more files in the same directory for WiFi connections, edit them in
the same way (though I'm not sure that a DNS server connected by WiFi is a good
idea).


Edit the file /etc/NetworkManager/NetworkManager.conf, comment out the line dns=dnsmasq
(or if you're feeling daring, delete it).

==4 - Set options as required in /etc/dnsmasq.conf==

In particular DHCP isn't enabled in the supplied default configuration so at
the very least you need to un-comment the dhcp-range line and check that it
is correct for the LAN.


-- 
Chris Green




More information about the ubuntu-users mailing list