By default dhclient overwrites the /etc/resolv.conf once the nameservers' ips are obtain from the DHCP server or the lease is renewed. This becomes problematic when there are other source of those from other interfaces (e.g. openconnect/openvpn, which set up DNS servers from the private network). The natural solution is the usage of resolvconf, which manages such updates from multiple sources and merges them into /etc/resolv.conf
Since this is more like a feature request, it was suggested that this should be fixed here (https://bbs.archlinux.org/viewtopic.php?pid=1969134).
Would such PR be accepted? The changes are quite trivial..
Thanks.
Describe the bug dhclient overwrites the /etc/resolv.conf blindly, disregarding the fact that it could have been updated by other (dhcp) clients
To Reproduce Steps to reproduce the behavior:
Expected behavior /etc/resolv.conf contents should be preserved somehow. Proposed way is to use resolvconf for that.
Environment: dhclient --version isc-dhclient-4.4.2
Additional Information
Some initial questions
Are you sure your feature is not already implemented in the latest ISC DHCP version? It is not - https://gitlab.isc.org/isc-projects/dhcp/-/blob/master/client/scripts/linux#L80
Are you sure your requrested feature is not already impemented in Kea? Perhaps it's a good time to consider migration? Did not check, but would prefer to keep original dhclient
Are you sure what you would like to do is not possible using some other mechanisms? Using hooks, yes, but feature implementation is better to be done as close to the source as possible
Have you discussed your idea on dhcp-users and/or dhcp-workers mailing lists? arch linux forum - https://bbs.archlinux.org/viewtopic.php?pid=1969134#p1969134
Is your feature request related to a problem? Please describe. I'm frustrated when my VPN tunnel DNS server IP is overwritten with the ISP dhcp
Describe the solution you'd like Check if /usr/bin/resolvconf exists and use it if it does
Describe alternatives you've considered switch to a different dhcp client
Funding its development ISC DHCP is run by ISC, which is a small non-profit organization without any government funding or any permanent sponsorship organizations. Are you able and willing to participate financially in the development costs?
I could provide the patch once I can fork the project here
Participating in development Are you willing to participate in the feature development? ISC team always tries to make a feature as generic as possible, so it can be used in wide variety of situations. That means the proposed solution may be a bit different that you initially thought. Are you willing to take part in the design discussions? Are you willing to test an unreleased engineering code?
yes
Contacting you How can ISC reach you to discuss this matter further? If you do not specify any means such as e-mail, jabber id or a telephone, we may send you a message on github with questions when we have them.