[Dnsmasq-discuss] dnsmasq seems to ignore or not wait for DNS servers behind a VPN

Vincent Cadet v_cadet at yahoo.fr
Sun Sep 13 11:15:50 BST 2009

Hi people.

I've installed *dnsmasq-2.49* under Gentoo. It runs concurrently with OpenResolv, which I need to add DNS server IP's to the resolver when I use my VPN connections. Actually OpenResolv acts upon */etc/dnsmasq-resolv.conf* and */etc/dnsmasq-resolvconf.conf*. The former holds the list of DNS servers, just like */etc/resolv.conf*.

When I connect to a remote VPN server through "pon", everything goes fine: the connection is established, routes are set and the IP addresses of the remote network DNS servers are added to /etc/resolv.conf and /etc/dnsmasq-resolv.conf so that the remote DNS server IP's appear *first*, i.e. before the IP of my local DNS server. However name resolution doesn't work against machines on the remote network as long as the IP address of my local network DNS server is present in /etc/dnsmasq-resolv.conf.

As long as the IP address of my local DNS server is present in /etc/dnsmasq-resolv.conf none of the remote machines can be contacted with their name. Name resolution always falls back against my local DNS server.

I must do the following to solve the issue:

a) comment out my local DNS server IP, which is last in /etc/dnsmasq-resolv.conf
b) reload dnsmasq configuration (/etc/init.d/dnsmasq reload)
c) ping a remote machine with its name
d) uncomment my local DNS server (/etc/dnsmasq-resolv.conf)
e) reload dnsmasq configuration

Only then will I be able to ping _any other remote machine_ with its name. Running "/etc/init.d/dnsmasq reload" right after the VPN connection is made doesn't solve anything.

Is this a problem with the metric? Is there something more I should check?

Thanks for any hint/suggestion.
Vince C.


More information about the Dnsmasq-discuss mailing list