Ubuntu – The proper way to change the DNS IP

dnsnetwork-manager

I suspect that the name server provided by my ADSL modem/router is buggy. Whenever I browse to a website for the first time in ubuntu, resolving the domain name takes at least 15 seconds.

To work around that problem, I changed the nameserver configuration in /etc/resolv.conf from 192.168.1.1 (my ADSL modem) to 8.8.8.8 (google's primary DNS). This seems to fix the problem, but unfortunately my changes to /etc/resolv.conf are overwritten by "NetworkManager" at each startup.

What is the proper way to configure the name server IP in ubuntu 10.4?

Best Answer

  • If you have typical connection setup with the network manager and DHCP, try the following:

    1. Right click on the network manager icon in the panel and choose "Edit connections..."
    2. Select your connection from the wired or wireless tab, choose "Edit"
    3. (Enter your password if the connection is set as "system-wide available")
    4. Choose IPv4 settings tab
    5. Switch method to "Automatic (DHCP) addresses only"
    6. Enter the name server you want in the box "Additional DNS servers" and press "Apply"

    That should do the trick.

  • Related Question