Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
05-11-2009, 12:36 AM
|
#1
|
LQ Newbie
Registered: Feb 2006
Posts: 6
Rep:
|
resolv.conf keeps getting rewritten
There is a file /etc/resolv.conf, and in that file are two nameservers which get accessed by internet applications. I know what two nameservers will make my applications successful in obtaining data from the web. So I set the file appropriately and everything works.
Then I reboot the computer and something rewrites it with two different nameservers. And my web pages time out.
I think I have gone through several different mysterious "somethings" since I've had this problem through several Ubuntu updates. I thought the culprit was called network-manager before, but I don't seem to have a network-manager now. There maybe twelve different applications all waiting their turn to helpfully rewrite resolv.conf for me.
So... I just want them to leave me alone.
Ubuntu 9.04
Qwest DSL
integrated MCP61 Ethernet card
(Is there other system information that might be relevant here?)
|
|
|
05-11-2009, 12:50 AM
|
#2
|
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465
Rep:
|
Quote:
Originally Posted by herpules
There is a file /etc/resolv.conf, and in that file are two nameservers which get accessed by internet applications. I know what two nameservers will make my applications successful in obtaining data from the web. So I set the file appropriately and everything works.
Then I reboot the computer and something rewrites it with two different nameservers. And my web pages time out.
I think I have gone through several different mysterious "somethings" since I've had this problem through several Ubuntu updates. I thought the culprit was called network-manager before, but I don't seem to have a network-manager now. There maybe twelve different applications all waiting their turn to helpfully rewrite resolv.conf for me.
So... I just want them to leave me alone.
Ubuntu 9.04
Qwest DSL
integrated MCP61 Ethernet card
(Is there other system information that might be relevant here?)
|
I think the "culprit" is your ISP acting through your router/modem. I had a similar problem (I wanted to use open dns servers and not the one supplied by my ISP). I solved it by installing the dhcp3-client and dhcp3-common packages. This will create an /etc/dhcp3/dhclient.conf file. As root or using sudo add the following line to this file:
Code:
prepend domain-name-servers {dns-server1_ip},{dns-server2_ip};
Just replace the {dns-server...} place holders with the ip number of the dns servers you want to use and Bob's your uncle.
cheers,
jdk
|
|
|
05-11-2009, 02:12 AM
|
#3
|
LQ Newbie
Registered: Feb 2006
Posts: 6
Original Poster
Rep:
|
That's not fixing it. Maybe it's trying, but something else is overcoming it? (Or did I miss a step? I can see dhclient running.)
/etc/resolv.conf is being rewritten by NetworkManager according to the first line of the file, which executes scripts in /etc/NetworkManager/dispatcher.d/, which currently contains 01ifupdown. 01ifupdown calls ifupdown scripts in /etc/network/, and so on and so on.
|
|
|
05-11-2009, 03:44 AM
|
#4
|
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465
Rep:
|
Quote:
Originally Posted by herpules
That's not fixing it. Maybe it's trying, but something else is overcoming it? (Or did I miss a step? I can see dhclient running.)
/etc/resolv.conf is being rewritten by NetworkManager according to the first line of the file, which executes scripts in /etc/NetworkManager/dispatcher.d/, which currently contains 01ifupdown. 01ifupdown calls ifupdown scripts in /etc/network/, and so on and so on.
|
You have to actually run to activate things (and possibly also stop and start your network connection). cheers,
jdk
|
|
|
05-11-2009, 07:34 AM
|
#5
|
LQ Newbie
Registered: Feb 2006
Posts: 6
Original Poster
Rep:
|
For some reason I thought you wanted me to actually include the curly braces.
Now it keeps rewriting all four nameservers, which I think is as functional as just having the good two. Thanks!
|
|
|
05-11-2009, 08:36 AM
|
#6
|
LQ Guru
Registered: Dec 2008
Location: Westgate-on-Sea, Kent, UK
Distribution: Debian Testing Amd64
Posts: 5,465
Rep:
|
Quote:
Originally Posted by herpules
For some reason I thought you wanted me to actually include the curly braces.
Now it keeps rewriting all four nameservers, which I think is as functional as just having the good two. Thanks!
|
Well done! We have defeated the evil isp's ! You can edit the dhclient.conf file and remove the unwanted servers if you like.
cheers,
jdk
|
|
|
All times are GMT -5. The time now is 10:32 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|