User login

Fixing Network Manager Overwriting DNS

in

Ubuntu Network Manager removes nameserver from resolv.conf

Note: /etc/dhcp3/dhclient.conf was a blank file for me, not sure it's supposed to be...

sudo vi /etc/dhcp3/dhclient.conf

add:
prepend domain-name-servers 127.0.0.1

/etc/init.d/networking restart && /etc/init.d/network-manager restart

Source: julian67 at http://forums.debian.net/viewtopic.php?f=6&t=45363
See also: http://azimyasin.wordpress.com/2007/10/02/network-manager-over-rides-dns-in-ubuntu-fix/
http://askubuntu.com/questions/32875/network-manager-rewrites-etc-resolv-conf-on-boot

Reference:
https://help.ubuntu.com/community/Dnsmasq
https://help.ubuntu.com/community/NetworkManager0.7

[When tested later, after VM restart, the server still can't be found. More research needs to be done before the following note and above instructions will work] Note: Running /etc/init.d/networking restart is deprecated because it may not enable again in some environments. Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service network-manager restart

When working the above command should be changed to the following. Note: This was done on an Ubuntu 11 VMware Machine running on Windows 7.

service networking restart && service network-manager restart

Note: the following command successfully prevented the file from being overwritten past restarts:
sudo chattr +i /etc/resolv.conf

However I still can't get ajaxchild.localhost in the browser to find apache.

Comments

Giving up for now

This is too much of a time suck, so I'm giving up on it for now. Too many other priorities. I would like to get a real linux drupal environment up and running sometime, but not this month. Would like your help on that, when I'm in town and you don't have high priority work to do. I might even just delete the whole machine and install 32bit Ubuntu instead of the unstable 64 bit one. Maybe that's part of the problem. Feel free to delete or alter any of my as you see fit. They might be useful to someone, but since they don't work for my test, I'm not sure how useful they will be.

Post new comment

The content of this field is kept private and will not be shown publicly.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.
  • You can use Markdown syntax to format and style the text. Also see Markdown Extra for tables, footnotes, and more.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img> <blockquote> <small> <h2> <h3> <h4> <h5> <h6> <sub> <sup> <p> <br> <strike> <table> <tr> <td> <thead> <th> <tbody> <tt> <output>
  • Syntax highlight code surrounded by the {syntaxhighlighter SPEC}...{/syntaxhighlighter} tags, where SPEC is a Syntaxhighlighter options string or "class="OPTIONS" title="the title".
  • Lines and paragraphs break automatically.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.