You are not logged in.

#1 2022-12-08 15:02:46

dojero
Member
Registered: 2011-11-26
Posts: 36

dhcpcd resolv.conf.head not working [SOLVED]

I am using only dhcpcd and wpa_supplicant. The wpa_supplicant hook is linked to dhcpcd and everything works well (on boot, dhcpcd uses my wpa_supplicant.conf file to pick the SSID and I'm connected within seconds). But I would rather use a DNS server like Google (8.8.8.8) or whatever, instead of using the DNS of my service provider. To do that, I created the /etc/resolv.conf.head file with my Cloudfare and other DNS addresses. But dhcpcd does not use it. It just keeps using my service provider. Then I added a static dns-server line to my /etc/dhcpcd.conf file. Also didn't work.

My /etc/resolv.conf file doesn't change, and always has the comment at the top: Generated by dhcpcd from wlp0s20f3.dhcpcd

Is this because dhcpcd will only do things this way once I use the wpa_supplicant hook? Is there any way to get dhcpcd to use the head file or to recognize the static DNS line in the dhcpcd.conf file?

Solution: Had to fix permissions on resolv.conf (with chattr -i).

Last edited by dojero (2022-12-08 16:48:38)

Offline

#2 2022-12-08 15:36:03

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: dhcpcd resolv.conf.head not working [SOLVED]

Stop the dhcpcd service and run "dhcpcd -dB" and see what it tells you.
You don't have openresolv installed, have you?

Offline

#3 2022-12-08 16:42:13

dojero
Member
Registered: 2011-11-26
Posts: 36

Re: dhcpcd resolv.conf.head not working [SOLVED]

Got it. Thank you. Was a permissions problem (immutable resolv.conf, now reset).

Everything is working fine. Thank you for the help.

And no, not using anything but dhcpcd and wpa_supplicant.

Last edited by dojero (2022-12-08 16:47:23)

Offline

#4 2022-12-08 17:13:22

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: dhcpcd resolv.conf.head not working [SOLVED]

cool
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.

Offline

#5 2022-12-08 19:03:03

dojero
Member
Registered: 2011-11-26
Posts: 36

Re: dhcpcd resolv.conf.head not working [SOLVED]

I edited the subject line to include [SOLVED] a half hour before your reminder. Did you not see it? Or did I do it wrong?

Offline

#6 2022-12-08 20:35:22

seth
Member
Registered: 2012-09-03
Posts: 50,012

Re: dhcpcd resolv.conf.head not working [SOLVED]

No, sorry, my bad.
I probably just looked at the head of the post hmm

Offline

Board footer

Powered by FluxBB