You are not logged in.
Hey guys,
For some unknown reason /etc/dhcpcd.conf continually overwrites my /etc/resolv.conf file, eventhough I set the "nohook resolv.conf" hook in /etc/dhcpcd.conf.
This is screwing up my DNS and intermittently creating connection problems. Any of you guys know why the hook is not taking effect or how I can stop dhcpcd from overwritting this file?
Thanks
Last edited by w201 (2013-03-18 19:05:15)
Offline
'What can be asserted without evidence can also be dismissed without evidence.' - Christopher Hitchens
'There's no such thing as addiction, there's only things that you enjoy doing more than life.' - Doug Stanhope
GitHub Junkyard
Offline
I set the "nohook resolv.conf" hook in /etc/dhcpcd.conf.
dhcpcd's configuration file may be edited to prevent the dhcpcd daemon from overwriting /etc/resolv.conf. To do this, add the following to the last section of /etc/dhcpcd.conf:
nohook resolv.conf
I don't think that information will help w201...
I changed my DNS to the Google one (8.8.8.8 or something). That's in "resolv.conf", isn't it? I remember editing some OTHER configuration file, which is then read to create the "resolve.conf" file. There it is, in that link to the wiki, under "Use resolv.conf.head". Does that help you do what you want to do?
Offline
w201 wrote:I set the "nohook resolv.conf" hook in /etc/dhcpcd.conf.
kaszak696 wrote:dhcpcd's configuration file may be edited to prevent the dhcpcd daemon from overwriting /etc/resolv.conf. To do this, add the following to the last section of /etc/dhcpcd.conf:
nohook resolv.conf
I don't think that information will help w201...
I changed my DNS to the Google one (8.8.8.8 or something). That's in "resolv.conf", isn't it? I remember editing some OTHER configuration file, which is then read to create the "resolve.conf" file. There it is, in that link to the wiki, under "Use resolv.conf.head". Does that help you do what you want to do?
There's three techniques at the wiki link, the nohook one, the resolv.conf.head one and the write-protection attribute.
"...one cannot be angry when one looks at a penguin." - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle
Offline
I saw the section in the wiki about using resolv.conf.head. Haven't tried it yet, but what's the difference between that and using the resolv.conf hook in dhcpcd.conf?
I don't know how familiar you are with networking...but perhaps you can answer this... so my resolv.conf file gets overwritten as I stated previously, when I look at the file, the nameservers get overwritten with these long 20 character strings that don't rsemble anything like a URL...noramally it would be 8.8.8.8 or 75.75.75.75. do you have any idea what these numbers mean?
Offline
I don't think that information will help w201...
He edited the post, i'm sure the option he posted initially wasn't 'nohook'.
@w201
Using the resolv.conf.head method does not prevent dhcpcd from editing resolv.conf, it just appends the contents of .head on top of dhcpcd's generated content, hence the .head contents have higher priority. Similarly, entries in resolv.conf.tail are appended after the generated content and have lower priority.
Do these 20-char strings look like IPv6?
Last edited by kaszak696 (2013-03-18 17:29:30)
'What can be asserted without evidence can also be dismissed without evidence.' - Christopher Hitchens
'There's no such thing as addiction, there's only things that you enjoy doing more than life.' - Doug Stanhope
GitHub Junkyard
Offline
drcouzelis wrote:I don't think that information will help w201...
He edited the post, i'm sure the option he posted initially wasn't 'nohook'.
@w201
Using the resolv.conf.head method does not prevent dhcpcd from editing resolv.conf, it just appends the contents of .head on top of dhcpcd's generated content, hence the .head contents have higher priority. Similarly, entries in resolv.conf.tail are appended after the generated content and have lower priority.
Do these 20-char strings look like IPv6?
Hey kaszak696, you're right I edited the file I had the wrong info in there. Thank for the info on tail and head, I understand it now.
The 20-char string does look like IPv6. I have a new router and It has IPv6, but I didn't think that was being used yet?
Last edited by w201 (2013-03-18 17:39:24)
Offline
He edited the post, i'm sure the option he posted initially wasn't 'nohook'.
That makes sense. I'm sorry. I just thought you were being cheeky.
I have a new router and It has IPv6, but I didn't think that was being used yet?
It's "in use", but I don't think many people have adopted it yet. Maybe the makers of your new router are PACE SETTERS.
Offline
kaszak696 wrote:He edited the post, i'm sure the option he posted initially wasn't 'nohook'.
That makes sense. I'm sorry. I just thought you were being cheeky.
w201 wrote:I have a new router and It has IPv6, but I didn't think that was being used yet?
It's "in use", but I don't think many people have adopted it yet. Maybe the makers of your new router are PACE SETTERS.
It's a Cisco router I guess you could say they're pace setters. I got a real good deal on an AC 1750.
Thanks for the help!
Offline
# chattr +i /etc/resolv.conf
is the simplest way to prevent overwriting.
Offline
# chattr +i /etc/resolv.conf
is the simplest way to prevent overwriting.
Thank you so much! That worked just fine.
Offline