You are not logged in.
Hi,
I'm using dhcp to configure my network at boot-up but I would to set the dns myself (so I can use the opendns ones).
How is this done with arch linux? In gentoo I had no dns option.
I've tried using the /etc/resolv.conf.head to set them, but the dns of my ISP still appear below it.
Thanks for your time in Advance.
Last edited by PuercoPop (2009-08-28 05:03:08)
Offline
from man dhcpd.conf
nohook script
Don't run this hook script. Matches full name, or prefixed with
2 numbers optionally ending with .sh.
So to stop dhcpcd from touching your DNS or MTU settings you
would do:-
nohook resolv.conf, mtu
Offline
There's also a Wiki article for this. It may also be useful to read through the thread quoted at the bottom of the article.
All men have stood for freedom...
For freedom is the man that will turn the world upside down.
Gerrard Winstanley.
Offline
Hmm, removing domain_name_servers from /etc/dhcpcd.conf should work but it looks like there is a bug in dhcpcd. This is the second time I've seen a post that /etc/resolve.conf.head isn't prepending dnsservers to /etc/resolv.conf). Works alright for me, here's mine just for reference:
nameserver 127.0.0.1
nameserver 208.67.222.222
nameserver 208.67.220.220
You might want to let roy know about this.
Setting Up a Scripting Environment | Proud donor to wikipedia - link
Offline
i stumbled upon this some days ago. tried this: http://wiki.archlinux.org/index.php/Network#For_DHCP_IP
neither the -C switch nor omitting domain_name_servers in dhcpcd.conf worked for me.
the "nohook resolv.conf" entry did it finally.
Last edited by DonVla (2009-08-27 16:03:09)
Offline
Thanks everyone for your input, I had tried just removing the domain_name_servers but with out adding the resolv.conf.head dhcpd fails on timeout. I was trying just to leave the info on resolv.conf thinking dhcp wouldn't touch it. Well it now works.
I feel like a noob for not RTFM!
Last edited by PuercoPop (2009-08-28 05:03:24)
Offline