12.04: How to add local details to dnsmasq config
Paul Smith
paul at mad-scientist.net
Fri Jun 1 19:17:02 UTC 2012
On Fri, 2012-06-01 at 13:49 -0500, C de-Avillez wrote:
> On Thu, 31 May 2012 22:23:59 -0400
> Paul Smith <paul at mad-scientist.net> wrote:
> > How can I add/remove config from the local DNS configuration?
>
> Perhaps the changes should be done to resolvconf instead -- it is now
> in use by default on 12.04, and dnsmasq refers to it for name
> resolution.
>
> Please see http://www.stgraber.org/2012/02/24/dns-in-ubuntu-12-04/ for
> the (original) announcement.
Yes, I've read this document and a few others on the Ubuntu site related
to this feature.
Using resolvconf won't help. I need to get at the dnsmasq configuration
because I have multiple DNS domains and I need to forward DNS queries to
different DNS servers based on the hostname.
This is handled by the NetworkManager VPN tools, which add dnsmasq
settings like:
server=/<domain>/<dns-ip>...
for every domain that is supported by that VPN. This tells dnsmasq to
forward lookups to different servers based on the domain, and that's
exactly what I need.
But my VPN doesn't have any NetworkManager integration so I need to give
a snippet of dnsmasq configuration to the system, that it will include
with its auto-generated configuration. Ideally I could add/remove it
dynamically as the VPN is stopped/started but even if I can just get it
added statically that'll be fine (that's how I used to have it).
Also, it's not always the case that the simple domain mapping
NetworkManager uses is sufficient. I have one VPN which provides only
one high-level domain, but actually there are a number of domains which
are served by those same internal servers (required due to acquisitions
etc.) I *might* be able to handle this by configuring the DNS info
myself in NetworkManager; I'll try that tonight.
More information about the ubuntu-users
mailing list