Newer Ubuntu systems use systemd-resolved which doesn't seem to support split-horizon dns (at least last time I looked).
One solution is to go back to using dnsmasq. * Install dnsmasq: apt get install dnsmasq * Update /etc/NetworkManager/NetworkManager.conf: [main] ... dns=dnsmasq * Add a dnsmasq config file to /etc/NetworkManager/|dnsmasq.d/foo.conf with your servers:| |||server=/foo.bar/bar.baz/1.2.3.4 * Restart network manager: ||| |||sudo service network-manager restart||| |||||| || * You might have to stop and disable the dnsmasq and resolved units:|| sudo systemctl stop systemd-resolved dnsmasq sudo systemctl disable systemd-resolved dnsmasq || * You might also have to link /etc/resolv.conf to the network manager generated one||: sudo mv /etc/resolv.conf /etc/resolv.conf.orig sudo ln -s /run/NetworkManager/resolv.conf /etc/resolv.conf || -Dennis | | On 1/8/20 2:37 PM, Ken D'Ambrosio wrote: > Hey, all. When I fire up my VPN, it re-writes my /etc/resolv.conf. > Shocker. But I *want* it to, because then all my DNS stuff is good for > my company. But it's NOT good for my personal domain. I'd like to have > that added to the search domains. I'm in Ubuntu; not sure if that > matters. From my reading: > * I can the search domains on a per-interface manner, but that seems > hokey, and subject to issues if I use something (e.g., Bluetooth) to be > my conduit to the 'Net. > * /etc/resolv.conf shouldn't be manually modified as it'll just get > overwritten (and I don't want to make it immutable because I want it to > change depending on whether I'm using VPN or no) > * /etc/dhclient/dhclient.conf (apparently) doesn't matter any more if > you're running NetworkManager > > So, my question: is there an elegant, global way to set/append to my DNS > domain search list? Or am I just gonna wind up writing a daemon to wham > an resolv.conf in-place depending on the current network config? > > Thanks, > > -Ken > _______________________________________________ > gnhlug-discuss mailing list > gnhlug-discuss@mail.gnhlug.org > http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
_______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/