You are not logged in.

#1 2009-03-10 21:14:03

denn1s
Member
From: Guatemala
Registered: 2009-03-10
Posts: 28

[SOLVED] dont update /etc/resolv.conf

Hello! Im new to Arch, great disto smile I got it up and running perfectly in a day with no useless programs, just what I need.

Due to a bug in my router (or isp?) my /etc/resolv.conf looks like this after conecting to the net:

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
search lan
nameserver 192.168.1.1
nameserver ###.###.###.##
nameserver ###.###.###.##
# /etc/resolv.conf.tail can replace this line

However, with that setup I can't get internet (can't resolve adresses), I have to change it to:

# Generated by dhcpcd from eth0
# /etc/resolv.conf.head can replace this line
search lan
nameserver ###.###.###.##
nameserver ###.###.###.##
# /etc/resolv.conf.tail can replace this line

And it works perfectly.
The problem is that after sometime passes (maybe dhpcd's lease time) the file returns to it's previous state and can't resolve adresses again.
Is there a way to get a default configuration in resolv.conf that doesn't change in time?

Last edited by denn1s (2009-03-10 22:35:07)


--
Running: Arch - x86_64 - KDE
On: Intel i5 - Nvidia 9600

Offline

#2 2009-03-10 21:25:21

xaff
Member
Registered: 2009-02-26
Posts: 64

Re: [SOLVED] dont update /etc/resolv.conf

Well, it's a hack but sudo chmod 111 /etc/resolv.conf will help I guess.

Try to figure if there's a way to stop your router from sending itlsef as dns server via dhcp too.

Offline

#3 2009-03-10 21:41:27

tdy
Member
From: Sacremende
Registered: 2008-12-14
Posts: 440

Re: [SOLVED] dont update /etc/resolv.conf

denn1s wrote:

Is there a way to get a default configuration in resolv.conf that doesn't change in time?

You can add -C resolv.conf to DHCPCD_ARGS in /etc/conf.d/dhcpcd:

DHCPCD_ARGS="-C resolv.conf -q"

Offline

#4 2009-03-10 21:45:14

Xyne
Administrator/PM
Registered: 2008-08-03
Posts: 6,963
Website

Re: [SOLVED] dont update /etc/resolv.conf

Hi denn1s, welcome to Arch!

Take a look at this section of the network configuration wiki page and post whether it helps.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Offline

#5 2009-03-10 22:11:53

denn1s
Member
From: Guatemala
Registered: 2009-03-10
Posts: 28

Re: [SOLVED] dont update /etc/resolv.conf

Hey, thanks for your quick answers. As thanks Ill try to answer in the forums whenever I seem to knw an answer  ^.^

I also thought changing permissions but, it seemed a little too cheap to work, hehe, thanks also for your answer, I can't seem to find a way to tell my dumb router that he is not a dns server...

I seem to have missed that in the wiki, thanks for pointing it out both of you.

EDIT: 
Problem solved following the wiki, thanks again. This is the way to solve it (in case anyone gets here via google or something)
edit: /etc/conf.d/dhcpcd
so that it reads:

 DHCPCD_ARGS="-C resolv.conf -q"

reestart networking

# /etc/rc.d/network restart

edit: /etc/resolv.conf
so that it contains your dhcpcd servers

nameserver ###.###.###.##
nameserver ###.###.###.##

Last edited by denn1s (2009-03-10 22:33:59)


--
Running: Arch - x86_64 - KDE
On: Intel i5 - Nvidia 9600

Offline

Board footer

Powered by FluxBB