:: Re: [DNG] hijacking resolv.conf - p…
トップ ページ
このメッセージを削除
このメッセージに返信
著者: Ralph Ronnquist
日付:  
To: dng
題目: Re: [DNG] hijacking resolv.conf - possible fix?
RTFM :)

The provision of domain server is and has been part of the Dynamic
Host Configuration Protocol (DHCP) for a very long time, and clients
typically have configuration options whether to request domain
settings from the DHCP server or not.

The "old" dhclient is configured in /etc/dhcp/dhclient.conf and it
requests those by default, meaning you would have to change that
configuration to not do so. It's probably true that the script you
found implements the handling of that part of the response and it's of
course also possible to address it by changing that implementation.

Other dhcp clients, e.g., udhcpc, may do things differently.

Ralph.

On Tue, Mar 18, 2025 at 04:44:03PM -0300, altoid via Dng wrote:
> Hello:
>
> Users of [connman] and [network-manager] (and possibly maybe other
> such applications) who want to run their boxes with their own DNS
> settings know exactly what I am referring to in the subject title.
>
> I was one of them till I decided to go the [ifupdown] route and rid
> myself of both the headache and a layer of abstraction.
>
> Then, while searching on how to fix something else, I came across
> [/sbin/dhclient-script] and within it, this bit which instantly
> called my attention:
>
> [code]
> --- snip ---
> # update /etc/resolv.conf based on received values    # <---- wthf?
>   make_resolv_conf() {
>       local new_resolv_conf
> --- snip --- 
> [/code]

>
> Not in any way script savvy but it seemed I had found the hijacker,
> so to speak.
>
> Those who know more could confirm my suspicions.
>
> According to [jed], the whole snippet is from line 39 to line 125 and
> it would seem (?) to be the routine that constantly overwrites
> [/etc/resolv.conf] just because some idiot thought it was a good idea
> to do so.
>
> The web is full of posts complaining about this issue from quite a
> few years back, all of which have been ignored.
>
> But I digress ...
>
> I was wondering if this could be put to death without much ado or
> causing extra work for the Devuan maintainers.
>
> Maybe a small / specific Devuan meta-package with a script to edit
> [/sbin/dhclient-script] and bring some peace to independent DNS
> users.
>
> Just a thought.
> Opinions/solutions welcome.
>
> Best,
>
> A.
> _______________________________________________
> Dng mailing list
> Dng@???
> Manage your subscription: https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng
> Archive: https://lists.dyne.org/lurker/list/dng.en.html