[Bug 192645] Re: Add, not replace current DNS, when doing network routing

Andrew Rodland arodland at comcast.net
Tue May 19 16:09:28 UTC 2009


This might be too complicated to implement for everyone, but while we're
wishlisting, here's how I accomplish split DNS (works for vpnc or
openvpn, at least).

1) Install dnsmasq, configure it in a DNS-only role (no DHCP), and bind to localhost.
2) Replace the nameserver entry in /etc/resolv.conf with 127.0.0.1
3) Configure dnsmasq with "no-resolv" and "server=original.upstream.server"
4) On VPN up, add "server=/remote.domain/remote.dns.server" lines to dnsmasq.conf and restart dnsmasq
5) On VPN down, remove same lines and restart dnsmasq

This works pretty much transparently and doesn't require restarting any
apps to make them see resolver changes. In step 3 instead of using no-
resolv, you could also use "resolv-
file=/path/to/resolvconfs/original/resolv.conf" -- the point, of course,
is that it doesn't see the file with "nameserver 127.0.0.1" that the
system will *actually* be using.

-- 
Add, not replace current DNS, when doing network routing
https://bugs.launchpad.net/bugs/192645
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list