Unix & Linux Asked on December 26, 2021
I have a system (running Ubuntu 20.04) with multiple network interfaces and I realized that the search domains (I’m looking at /etc/resolv.conf
, which I know is just a symlink to a systemd-resolved
managed file) are getting added automatically as soon as I plug in a new cable. That’s nice!
Unfortunately, when doing the reverse (i.e., disconnecting a cable), the search domain entries are left untouched, creating all sorts of unwanted side-effects.
Example:
eno1
:
#$> cat /etc/resolv.conf
nameserver 127.0.0.53
options edns0
search mydomain.com
#$>
eno2
:
#$> cat /etc/resolv.conf
nameserver 127.0.0.53
options edns0
search mydomain.com additionaldomain.com
#$>
eno2
:
#$> cat /etc/resolv.conf
nameserver 127.0.0.53
options edns0
search mydomain.com additionaldomain.com
#$>
As far as I understand, I could reboot the system or edit the appropriate files manually; but as soon as I plug a cable back in, I’m back to square one.
What program manages the search domain entries in resolv.conf, and how do I "force" an update of those entries?
Get help from others!
Recent Questions
Recent Answers
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP