12.04: How to add local details to dnsmasq config

Marius Gedminas marius at pov.lt
Fri Jun 1 07:24:11 UTC 2012


Hello,

On Thu, May 31, 2012 at 10:23:59PM -0400, Paul Smith wrote:
> Hi all.  So, the new integrated dnsmasq / DNS service for Ubuntu 12.04
> is nice.  However it only works with NetworkManager enabled software
> solutions.
> 
> I have a 3rd party VPN tool which is most decidedly NOT integrated with
> Network Manager, and I need to add appropriate extra setup to the
> dnsmasq configuration to handle the DNS forwarding for that environment.
> I used to manage all this myself by hand so I'm quite aware of what
> needs to be done and how it all works.
> 
> However, I don't know how to add extra content to the dnsmasq
> configuration network-manager uses.  I can see that network-manager
> starts a dnsmasq server that listens on 127.0.0.1 (good stuff) and that
> the configuration file is /var/run/nm-dns-dnsmasq.conf which I assume is
> being auto-generated by network manager.

Interesting.  I'm on 12.04 as well, and I also use a VPN tool not
integrated with NetworkManager (openvpn --config /path/to/config-file
--route-nopull --route x.y.0.0 255.255.0.0).  I don't have a
/var/run/nm-dns-dnsmasq.conf on my system, even though I most definitely
have dnsmasq running. 

I've configured DNS lookups for the internal domain by adding

  # X.X.X.X is the internal IP of the DNS server.
  server=/example.com/X.X.X.X

to /etc/dnsmasq.d/vpn-dns and doing a 'service dnsmasq restart'.  This
worked quite well until this morning, when the internal DNS went down ;)

> That's all good stuff, BUT I need a way to add my own set of
> configuration to that nm-dns-dnsmasq.conf file, preferably dynamically
> (so I can script the bring-up and bring-down of my proprietary VPN and
> get it added and removed at the appropriate times).
> 
> How can I add/remove config from the local DNS configuration?

dnsmasq supposedly has a DBus control protocol of some kind, but I
haven't been able to find documentation for it.

A static configuration works well enough for me.

Marius Gedminas
-- 
Many people enjoy Perl, many enjoy Python, some enjoy /bin/tcsh.  The latter
population should however, needless to say, be put into working camps.
        -- viktor on Slashdot
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20120601/9bf3164e/attachment.sig>


More information about the ubuntu-users mailing list