up vote 1 down vote favorite
share [g+] share [fb]

When I edit /etc/resolv.conf, it is overwritten right away with the old configuration. How do I really change the nameserver on Ubuntu Server 9.10?

link|improve this question

feedback

1 Answer

up vote 4 down vote accepted

Here is how I do it:

  1. Backup your resolv.conf

    sudo cp /etc/resolv.conf /etc/resolv.conf.auto
    
  2. Edit /etc/dhcp3/dhclient.conf:

    sudo gedit /etc/dhcp3/dhclient.conf
    
  3. If there are any nameservers, write them down for future reference.

  4. Replace the reference line, or add:

    prepend domain-name-servers 1.2.3.4,4.3.2.1;
    
  5. Save and exit!

  6. Restart any Internet clients and services

  7. Test your new settings.

This should work in 9.10 just fine.

link|improve this answer
You even knew the DNS server I wanted! Thanks, it worked – Jeffrey Aylesworth Feb 22 '10 at 18:16
4  
that's amazing! that's the same combination i have on my luggage! – quack quixote Feb 22 '10 at 21:49
Why did you edit out a working DNS server, for one that doesn't exist? – Jeffrey Aylesworth Feb 24 '10 at 21:06
Me? Well I'd figure you already had your own in mind :-\ – Urda Feb 24 '10 at 21:51
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.