LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   resolv.conf dns issues (https://www.linuxquestions.org/questions/linux-software-2/resolv-conf-dns-issues-368499/)

billbob 09-30-2005 11:50 AM

resolv.conf dns issues
 
In my resolv.conf file I have the entry 192.168.8.1 and then the proper dns address under it as the next entry. I have deleted the 192.168.8.1 and left only that one under it and it works fine however it only takes about a half an hour and the bad entry is back. I have denied permissions on this file and it still somehow gets edited. How can I make the entries I want and delete the rest and actually have them gone for good.

in other words I only want 1 dns address the correct one if I add 2 correct ones then one gets deleted and the 192.168.8.1 gets added in its place. All I want to do is make my resolv.conf file right and have it stay that way.

anomie 09-30-2005 12:02 PM

Quote:

however it only takes about a half an hour and the bad entry is back.
You probably have a setting in place to update nameservers via DHCP. Not sure which distro you're using, but hopefully that setting will be transparent enough for you to find and disable.

For example: In SuSE, there is a YaST setting that allows you to disable nameserver updating via dhcp, and you can then specify the nameservers manually.

billbob 09-30-2005 12:07 PM

I am using mandrake 10.1

anomie 09-30-2005 12:20 PM

Well, unfortunately I don't know mandrake.

Here's a CLI alternative in case your network scripts look anything like SuSE's.

First back up the dhcp file in case you mangle it:
Code:

cp /etc/sysconfig/network/dhcp /etc/sysconfig/network/dhcp.backup
Next find the line in /etc/sysconfig/network/dhcp that looks like
Code:

DHCLIENT_MODIFY_RESOLV_CONF="yes"
and change it to
Code:

DHCLIENT_MODIFY_RESOLV_CONF="no"
Finally, restart your network service. Should be something like
Code:

/etc/init.d/network restart
After this I think you should be able to happily edit your /etc/resolv.conf without it getting overwritten.

Good luck.


All times are GMT -5. The time now is 04:29 AM.