Networking Forums

Networking Forums > Computer Networking > Linux Networking > Overwriting /etc/resolv.conf

Reply
Thread Tools Display Modes

Overwriting /etc/resolv.conf

 
 
Bit Twister
Guest
Posts: n/a

 
      04-15-2005, 02:37 AM
On 14 Apr 2005 20:51:07 CST, JGH wrote:
> I have a dsl connection throug my local phone company. Every so often, the
> changes I make to /etc/resolv.conf are over written. I use dhcpc to get the
> connection. Can I make it stop?


Should be able tol

> Will it mess up my connection if I do?


No idea what you are doing in resolv.conf.

There are 190+ linuxes.
Please read http://www.catb.org/~esr/faqs/smart-questions.html
Always provide distribution, release, and if Mandrake, community,
official, cooker, when posting questions.
It could help you get better answers.

I know on Mandrake linux I can
add PEERDNS=no to /etc/sysconfig/network-scripts/ifcfg-X
where X is the interface config file or add it to /etc/sysconfig/network
to suppress resolv.conf update.
 
Reply With Quote
 
 
 
 
JGH
Guest
Posts: n/a

 
      04-15-2005, 02:51 AM
I have a dsl connection throug my local phone company. Every so often, the
changes I make to /etc/resolv.conf are over written. I use dhcpc to get the
connection. Can I make it stop? Will it mess up my connection if I do?

 
Reply With Quote
 
Floyd L. Davidson
Guest
Posts: n/a

 
      04-15-2005, 03:43 AM
JGH <(E-Mail Removed)> wrote:
>I have a dsl connection throug my local phone company. Every so often, the
>changes I make to /etc/resolv.conf are over written. I use dhcpc to get the
>connection. Can I make it stop? Will it mess up my connection if I do?


"man dhcpcd" give you this information:

-R Prevents dhcpcd from replacing existing
/etc/resolv.conf file.

-Y Prevents dhcpcd from replacing existing
/etc/yp.conf file. Domainname is not
updated unless -D is specified.

-N Prevents dhcpcd from replacing existing
/etc/ntp.conf file.

The man pages are wonderful things... but only *if* you read them!

--
Floyd L. Davidson <http://web.newsguy.com/floyd_davidson>
Ukpeagvik (Barrow, Alaska) (E-Mail Removed)
 
Reply With Quote
 
johnny bobby bee
Guest
Posts: n/a

 
      04-15-2005, 08:42 AM
Floyd L. Davidson wrote:
> "man dhcpcd" give you this information:
>
> -R Prevents dhcpcd from replacing existing
> /etc/resolv.conf file.
>
> -Y Prevents dhcpcd from replacing existing
> /etc/yp.conf file. Domainname is not
> updated unless -D is specified.
>
> -N Prevents dhcpcd from replacing existing
> /etc/ntp.conf file.
>
> The man pages are wonderful things... but only *if* you read them!
>


and what if you don't have dhcpcd?

i had this problem as well. what worked for me is adding some lines to
my dhclient.conf file. mine is in:
/etc/dhcp3/dhclient.conf

look for the 'supersede' or 'prepend' options. and add your dns servers
there. that way when your resolv.conf files gets (over)written, at least
it will be written with what you want.



--
Windows (OS) is like a gun - unless it's loaded, it's harmless.
 
Reply With Quote
 
Baho Utot
Guest
Posts: n/a

 
      04-15-2005, 11:00 PM
On Thu, 14 Apr 2005 20:51:07 -0600, JGH wrote:

> I have a dsl connection throug my local phone company. Every so often, the
> changes I make to /etc/resolv.conf are over written. I use dhcpc to get the
> connection. Can I make it stop? Will it mess up my connection if I do?


set the immutable bit:
chattr +i /etc/resolv.conf

--
Tayo'y Mga Pinoy

 
Reply With Quote
 
Tom
Guest
Posts: n/a

 
      04-18-2005, 04:45 AM

"JGH" <(E-Mail Removed)> wrote in message
news:Xns9638D7291D3D0mjohnheimcom@216.170.153.136. ..
> I have a dsl connection throug my local phone company. Every so often, the
> changes I make to /etc/resolv.conf are over written. I use dhcpc to get

the
> connection. Can I make it stop? Will it mess up my connection if I do?
>


Out of curiosity so I understand, why does it matter
if your /etc/resolv.conf is overwritten if your
computer is a dhcp client?


 
Reply With Quote
 
Unruh
Guest
Posts: n/a

 
      04-18-2005, 07:56 AM
"Tom" <(E-Mail Removed)> writes:


>"JGH" <(E-Mail Removed)> wrote in message
>news:Xns9638D7291D3D0mjohnheimcom@216.170.153.136 ...
>> I have a dsl connection throug my local phone company. Every so often, the
>> changes I make to /etc/resolv.conf are over written. I use dhcpc to get

>the
>> connection. Can I make it stop? Will it mess up my connection if I do?
>>


>Out of curiosity so I understand, why does it matter
>if your /etc/resolv.conf is overwritten if your
>computer is a dhcp client?


I do not kno his reasons, but I find some ISPs dns servers are really
crappy, and want to use one with better response. Of course some isps block
dns requests going out in which case you have no choice.

 
Reply With Quote
 
Coenraad Loubser
Guest
Posts: n/a

 
      04-18-2005, 12:55 PM
I think it depends on your linux disto.

If you use Suse you can probably use Yast to manually add servers that
will be put there as defaults when it is updated.

I think!
 
Reply With Quote
 
Coenraad Loubser
Guest
Posts: n/a

 
      04-18-2005, 12:55 PM
Coenraad Loubser wrote:
> I think it depends on your linux disto.
>
> If you use Suse you can probably use Yast to manually add servers that
> will be put there as defaults when it is updated.
>
> I think!


Or search /etc/sysconfig
 
Reply With Quote
 
General Schvantzkoph
Guest
Posts: n/a

 
      04-18-2005, 04:18 PM
On Thu, 14 Apr 2005 20:51:07 -0600, JGH wrote:

> I have a dsl connection throug my local phone company. Every so often, the
> changes I make to /etc/resolv.conf are over written. I use dhcpc to get the
> connection. Can I make it stop? Will it mess up my connection if I do?


The right solution is to get a router and use that as your gateway.
Routers are cheap and they give you an extra layer of defense. You can
connect to the router using a static IP.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
dhcpd.conf, resolv.conf and the search directive Andy Richardson Linux Networking 4 07-13-2005 08:23 AM
ipv6 and resolv.conf Hans Fugal Linux Networking 0 05-18-2004 04:02 PM
resolv.conf question Geoff Wheeler Linux Networking 1 02-24-2004 09:10 PM
resolv.conf Stephen Speicher Linux Networking 5 12-10-2003 09:00 AM
NIS, DNS and resolv.conf ncrfgs Linux Networking 2 10-02-2003 05:09 PM



1 2 3 4 5 6 7 8 9 10 11