<div dir="ltr"><div>For my own reference, mostly, and people somehow arriving here by Google...</div><div><br></div><div>According to NetworkManager's documentation:</div><div><br></div><div><a href="https://developer.gnome.org/NetworkManager/stable/settings-ipv4.html">https://developer.gnome.org/NetworkManager/stable/settings-ipv4.html</a></div><div><br></div><div>about the dns-priority setting, given that:</div><div><br></div><div>* I'm using dnsmasq as NetworkManager's resolver</div><div>* My default route is in my wifi connection</div><div>* Work's VPN specifies a search domain</div><div><br></div><div>I should get the behavior I want reliably without further work.</div><div><br></div><div>Thanks,</div><div><br></div><div>Álex<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sat, Jun 6, 2020 at 1:33 PM Alex Corcoles <<a href="mailto:alex@corcoles.net">alex@corcoles.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi,</div><div><br></div><div>I run DHCP/DNS using dnsmasq in three different sites. Each site has a domain a|b|<a href="http://c.int.personal.com" target="_blank">c.int.personal.com</a>. Each site has:</div><div><br></div><div>server=/<a href="http://other.int.personal.com/" target="_blank">other.int.personal.com/</a><ip of other.int.personal.com.dnsmasq><br>rev-server=<other.int.personal.com.dhcp.range>,<ip of other.int.personal.com.dnsmasq></div><div><br></div><div>for the other two sites. This works beautifully :)</div><div><br></div><div>However, when I jump on work's VPN on my a site, nmcli prints:</div><div><br></div><div>----------<br></div><div>DNS configuration:<br> servers: work dns servers<br> domains: <a href="http://work.com" target="_blank">work.com</a><br> interface: tun0<br> type: vpn<br><br> servers: my dns server<br> domains: <a href="http://a.int.personal.com" target="_blank">a.int.personal.com</a><br> interface: wlp0s20f3</div><div>----------<br></div><div><br></div><div>Which works pretty well; I can resolve hosts on *.<a href="http://work.com" target="_blank">work.com</a> and *.<a href="http://a.int.personal.com" target="_blank">a.int.personal.com</a> perfectly. However, NetworkManager assigns the same priority to both connection's DNS servers for hostnames outside *.<a href="http://work.com" target="_blank">work.com</a> and *.<a href="http://a.int.personal.com" target="_blank">a.int.personal.com</a>, such as *.<a href="http://b.int.personal.com" target="_blank">b.int.personal.com</a>, which means I can sometimes resolve them, and sometimes not.</div><div><br></div><div>Is there any way to configure dnsmasq to "advertise" that the DNS server it provides via DHCP should also be used for *.b|<a href="http://c.internal.personal.com" target="_blank">c.internal.personal.com</a> hostnames? man dnsmasq says...</div><div><br></div><div>...</div><div> -s, --domain=<domain>[,<address range>[,local]]<br> Specifies DNS domains for the DHCP server....</div><div><br></div><div>but it is not clear to me how to specify multiple domains here or even if this is the option I want.</div><div><br></div><div>Cheers,</div><div><br></div><div>Álex<br></div></div>
</blockquote></div>