how to static /etc/resolv.conf

Asked by Marcelo

the network manager constantly overwrite the DNS that I write in /etc/resolv.conf and put incorrect DNS...

I'm using movile broadband connection and huawei e 226 modem and the problem is with DNS, because the connection is establishing but i have no ping and no resolution.

please i need to know how to hace static /etc/resolv.conf (using network manager to manage the connection)

thanks in advance!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#1

Ubuntu 8.10 DNS dont' works

If you can open the page http://82.105.36.210/ and not http://www.elart.it is a DNS issue... so please try:

Migth be related to this bug https://bugs.edge.launchpad.net/ubuntu/+source/network-manager/+bug/279262

As a workaround please try to set OpenDns dns server https://www.opendns.com/smb/start/
into your resolv.conf and lock it:

Open a Terminal from the menu Applications → Accessories → Terminal and type:
(when the system ask you a password give your user password, you will not see nothing when you type it, then press enter)

sudo gedit /etc/resolv.conf

add this rows as first DNS server (you can also put your provider DNS instead of OpenDNS servers)

nameserver 208.67.222.222
nameserver 208.67.220.220

save and exit

Then to avoid other modification from other program, lock your resolv.conf, still sing terminal type:

sudo chattr +i /etc/resolv.conf

Then try... if still this doesn't works please rebbot your pc, and try again.

Hope this helps

Revision history for this message
Marcelo (marceloramone-gmail) said :
#2

After do the changes for you related marcobra, (but with the ISP DNSs instead openDNSs) the connection was disabled and is impossible to enable again.

I Think this method doesn't works.-

Revision history for this message
marcobra (Marco Braida) (marcobra) said :
#3

Restore the /etc/resolv.conf attribute

sudo chattr -i /etc/resolv.conf

and then try this:

sudo gedit /etc/dhcp3/dhclient.conf

give your user password when requested, you don't see nothing when you type it, then press enter.

Change the prepend line to read:

prepend domain-name-servers 208.67.222.222, 208.67.220.220;

save and exit and restart your newortk:

sudo /etc/init.d/networking restart

Hope This Help

Can you help with this problem?

Provide an answer of your own, or ask Marcelo for more information if necessary.

To post a message you must log in.