Solved

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

Posted on 2004-03-23
5
2,076 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 62

Expert Comment

by:gheist
ID: 10664738
DHCP client software ...
0
 

Author Comment

by:haldrik
ID: 10678240
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 62

Assisted Solution

by:gheist
gheist earned 30 total points
ID: 10679105
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
ID: 10826657
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
ID: 10856085
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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

860 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