Solved

resolv.conf keeps getting reset, erasing my nameserver ips with localhost info

Posted on 2004-03-23
5
2,065 Views
Last Modified: 2013-11-22
Hello:
I'm recently having a problem with all internet apps, in that the nameserver file /etc/resolv.conf keeps getting reset to:

search homeland.net
nameserver 192.168.1.1  (neither of which actually works, of course!)

instead of what I want it to be, which is:

nameserver 205.152.46.254
nameserver 205.152.144.235

I have a backup file that I keep having to replace the resolv.conf file in order to connect to things, but this is obviously very tedious...Any idea what could be causing this?
0
Comment
Question by:haldrik
  • 2
  • 2
5 Comments
 
LVL 61

Expert Comment

by:gheist
Comment Utility
DHCP client software ...
0
 

Author Comment

by:haldrik
Comment Utility
Thanks for the tip-- I guess what I wanted to know was how to correct this...I'm using whatever the default DHCP client was the default during installation.
0
 
LVL 61

Assisted Solution

by:gheist
gheist earned 30 total points
Comment Utility
Then it adds nameserver as dhcp server says.
look at "man 5 dhclient.conf"
and then edit the described file to avoid overwriting resolv.conf.
resolver order is mentioned in /etc/nsswitch.conf btw
0
 

Accepted Solution

by:
mjoyner earned 70 total points
Comment Utility
Put something along these lines into your /etc/dhclient.conf

put in your ethernet card name for rl0
put in your host-name
put in your DNS info instead of 127.0.0.1 (unless you are wanting to run named locally)

interface "rl0" {
        send host-name "yourhost.dynip.com";
        prepend domain-name-servers 127.0.0.1;
}
0
 

Author Comment

by:haldrik
Comment Utility
Well, I seem to have solved this problem with a combination of the last comment, which I accepted in its entirety, and also by adjusting the /etc/nsswitch.conf file as suggested by gheist (the actual changes I looked up on another site). I am unable to reproduce the error at this point (even by undoing the fixes), so I cant only say that I believe that the point split that I did here is the fairest solution I could think of.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Attention: This article will no longer be maintained. If you have any questions, please feel free to mail me. jgh@FreeBSD.org Please see http://www.freebsd.org/doc/en_US.ISO8859-1/articles/freebsd-update-server/ for the updated article. It is avail…
Introduction Regular patching is part of a system administrator's tasks. However, many patches require that the system be in single-user mode before they can be installed. A cluster patch in particular can take quite a while to apply if the machine…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now