Hi Martin, I've been using a local dnsmasq instance on my VPN client which has some advantages:
(1) you can configure specific forwarders for particular domains (e.g. for local domains that are reachable only via a tunnel or resolving the VPN endpoint name always via your ISP's server) (2) you can control its behavior using dbus (e.g. add/change the default/specific forwarder) HTH, Mathias. Martin Lund wrote: > Hello All, > > I was thinking on how to solve this problem because starts to get annoying. I > have my linux machine connecting through openvpn with a script. > > After connecting my script replaces the dns servers in /etc/resolv.conf with > OpenDNS so all the DNS requests will be forwarded through the VPN tunnel. > > The only problem is that if the VPN tunnel dies and it tries to re-resolve > the address it can't because those DNS requests will be sent through the > tunnel as well. > > Is there a solution for this? > > I know that there are multiple entries possible in /etc/resolv.conf so for > example I could put: > > nameserver <opendns> > nameserver <localdns> > > in there expecting that the secondary DNS will only be used if the name > resolution fails on the first one but my experience is that when the first > fails, linux just don't switch over to the second one and my concern is that > if I insist on having all the DNS requests go through the tunnel then even if > the first NS works there can be some requests sent to the second one. > > I think that would be good if it would be possible to tell openvpn that try > to resolve the vpn server's domain through given local nameserver (no matter > what) or through 8.8.8.8. > > Thanks! ------------------------------------------------------------------------------ _______________________________________________ Openvpn-users mailing list Openvpn-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-users