Can I install dnsmasq as well as (instead of?) dnsmasq-base?
Chris Green
cl at isbd.net
Mon Nov 12 13:52:28 UTC 2012
On Mon, Nov 12, 2012 at 02:36:11PM +0200, Marius Gedminas wrote:
> On Mon, Nov 12, 2012 at 12:20:32PM +0000, Chris Green wrote:
> > Current (i.e. 12.04 and 12.10) versions of Ubuntu install dnsmasq-base
> > as a dependency of Network Manager (this is because Network Manager now
> > runs dnsmasq as a local caching DNS server).
> >
> > I want to run my own configuration for dnsmasq. If I install the
> > dnsmasq package will this then 'play nicely' with Network Manager?
>
> TL;DR: Yes.
>
>
> For values of 'play nicely' meaning your dnsmasq configuration will
> override whatever Network Manager is doing, so, e.g., if you configure
> split DNS configuration for your VPNs in NM, that configuration will not
> have any effect. (I'm assuming you can do that in NM, I've never tried
> myself.)
>
> On the other hand, things work fine for regular use -- when Network
> Manager connects to some network and gets a DHCP lease, the proper DNS
> for that network ends up being used by the system-wide dnsmasq.
>
I want 'my' dnsmasq to provide both DHCP and DNS services on the LAN
because the DHCP in my router doesn't store names when hosts register
using DHCP.
If I remove the "dns=dnsmasq" line from will that do what I want, i.e.
just run my dnsmasq?
> I ran that configuration for a while on 12.04. One thing that made
> things work better in this particular case was adding
>
> clear-on-reload
>
> to /etc/dnsmasq.d/clear-cache-on-network-switch (because the local DNS
> server at my office network resolved some fully-qualified hostnames to
> their internal IPs, and that would break connectivity to them when I
> moved outside of that LAN).
>
>
> Another caveat to note: if you apt-get install dnsmasq, decide it
> doesn't work right, then apt-get remove dnsmasq, it will leave
> /etc/init.d/dnsmasq in place (it's a conffile!), which means you will
> still have a running system-wide dnsmasq that will prevent the one
> started by Network Manager to binding to a socket. So if you find
> something doesn't work, be sure to apt-get purge dnsmasq to get to the
> status quo ante.
>
--
Chris Green
More information about the ubuntu-users
mailing list