<html><head></head><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif;font-size:16px"><div id="yui_3_16_0_1_1450492073209_4750">DNSmasq is setup on my Asus rt-ac68u router, along with openvpn.</div><div id="yui_3_16_0_1_1450492073209_4765">I've configured openvpn as a vpn client so the router connects to an openvpn server.</div><div id="yui_3_16_0_1_1450492073209_4769">Openvpn has been setup with selective routing so only a few machines on the lan use the VPN.<br></div><div id="yui_3_16_0_1_1450492073209_4766">The openvpn server pushes it's own DNS servers to my openvpn client.</div><div id="yui_3_16_0_1_1450492073209_4767">Currently, the openvpn client overwrites the /tmp/resolv.conf file with the vpn DNS servers.  This provides the entire lan with the VPN DNS servers.  DNSmasq has been configured to use the /tmp/resolv.conf file using the "--resolv-file" option.<br></div><div id="yui_3_16_0_1_1450492073209_4812">When the openvpn client stops, the /tmp/resolv.conf file is restored to its original (non-vpn dns server) values.<br></div><div id="yui_3_16_0_1_1450492073209_4795">What would be better is to only use the openvpn DNS servers for a few (dnsmasq) clients on the lan.<br></div><div id="yui_3_16_0_1_1450492073209_4652"><br></div><div id="yui_3_16_0_1_1450492073209_4868">The "--server" option can use different upstream DNS servers for different resolvable domains by using the format "--server=/domain/dnsserv"</div><div id="yui_3_16_0_1_1450492073209_4950">Can dnsmasq be configured to use different upstream DNS servers for different clients on the lan?</div><div id="yui_3_16_0_1_1450492073209_4979"><br></div><div id="yui_3_16_0_1_1450492073209_4949">I noticed some people suggested the following solution:</div><div id="yui_3_16_0_1_1450492073209_4980"><br></div><div id="yui_3_16_0_1_1450492073209_4981" dir="ltr">dhcp-host=<mac-addr>,net:vpnclient<br class="" id="yui_3_16_0_1_1450492073209_4965">dhcp-option=vpnclient,6,<dnsserv1>,<dnsserv2></div><div id="yui_3_16_0_1_1450492073209_4998" dir="ltr"><br></div><div id="yui_3_16_0_1_1450492073209_4999" dir="ltr">This has the effect of sending to the given client (by <mac-addr>) the DNS servers <dnsserv1> and <dnsserv2>.  However, as the client hasn't connected to the VPN (only the router is connected), this solution doesn't work as the client can't find a route to the VPN's DNS servers.</div><div id="yui_3_16_0_1_1450492073209_5007" dir="ltr"><br></div><div id="yui_3_16_0_1_1450492073209_5022" dir="ltr">Is it possible to specify different "--server" options with different lan clients?</div><div id="yui_3_16_0_1_1450492073209_5034" dir="ltr"><br></div><div id="yui_3_16_0_1_1450492073209_5033" dir="ltr">Thanks in advance.</div><div id="yui_3_16_0_1_1450492073209_5036" dir="ltr"><br></div><div dir="ltr">Ledge.</div><div dir="ltr"><br></div><div id="yui_3_16_0_1_1450492073209_4983" dir="ltr"><br></div><div dir="ltr"><br></div></div></body></html>