Problem after using Mobile broadband

Hi,

I am having a USB mobile broadband (Provider:reliance)
I already had a problem that I cannot connect through wired internet after using this USB broadband.

Later its found that the nameserver has been changed. So I manually changed it 8.8.8.8 and 8.8.4.4
and wired internet started working.

again, when i used this usb mobile broadband, it automatically changes the nameservers as given below in the resolv.conf file.


nameserver 220.226.6.104
nameserver 220.226.100.40

No matter how many times I correct it to google nameserver, when i use the USB broadband, the file is rewritten as like the above.
Please help.

Try this, might work: Set the Google nameservers in Yast → Network Devices → Network settings → Hostname DNS → Name Servers

If swerdna’s solution does not work…

IIRC there was an option (in Yast during the setup of a connection - I always used ifup method) for every type of connection to either let it change the name servers (change /etc/resolv.conf) or not.

Please look carefully in the connection settings, depending on the method you use (ifup or NetworkManager) if and where this option is available.

Cheers and good luck.

PS

I think I found it - based on swerdna’s solution and it’s system wide, see here: Chapter

See section 9.4.1.4. Configuring Hostname and DNS

By “after” do you mean connecting to wired <while> your wireless connection is still active, or after you <positively> terminated your wireless connection?

If the former, your configuration has similarities to split-tunnel VPNs, so I’d expect that solutions for that should resolve your problem.

If the latter, then I’d guess that because your USB adapter might still be plugged into your machine, your machine might <think> that the network settings should be preserved because the adapter would still be considered active although with no active connection, so your solution could be as simple as <properly> detaching the USB device before physically removing it (don’t just yank the device out, maybe it’ll work but maybe not).

If you’re <still> having problems, then I can’t think of any alternative to manually removing the entries from resolve.conf (I doubt that simply “nscd --invalidate” will work).

HTH,
TS

Good one – well found

Dear Swerdna,
When I open-up the network settings, under the hostname/DNS tab, the nameserver colums are inactive - I thing this is because i dont use ifup and use network manager for managing connections (correct me if i am wrong)

Hi tsu2:
The problem is occurring after termination of the wireless connection (of-course after pulling out the usb modem)
and could you please elaborate the split-tunnel VPN? - and how the resolve this problem?

I have a laptop with wireless, not wired, so I don’t know if this will work for your wired connection: For DHCP addressing over wireless using network manager applet in systray: GoTo Applet –> Manage Connections –> Wireless Tab –> Edit connection –> IPv4 Tab –> set Method to “Automatic (DHCP) Addresses only” and you can fill in the Name Servers as 8.8.8.8, 8.8.4.4 (note the comma separator)

Can you also do that for the wired connection?

If the above doesn’t work, you can also try the brutal way: fill resolv.conf with your desired DNS adresses, then open terminal and write:

chattr +i /etc/resolv.conf

This will preserve any program from changing the file, making it immutable. In order to remove immutability:

chattr -i /etc/resolv.conf

Hi Swerdna,
When i did what you said to the wireless connection, after entering the DNS servers and hitting save, it doesnt saves. - i mean it automatically reverts back to Automatic (DHCP) and again the DNS servers field is inactive - no matter how many times i set it.

@krysiul:
i’ve tried your method. hope it works! I will post after using the usb broad band. (Whether again the resolv.conf file is changed or not) :wink:

Although a useful trick that’s a dirty workaround :slight_smile: I think You will be better of finding what’s your problem with NetworkManager applet.

This should work. What desktop are You using and if KDE which version of plasmoid?

If you’re using knetworkmanager switch to plasmoid as the first one is long unmaintained by the KDE guys.

Best regards,
Greg

It didnt work! it reverts back when i click save and restart the app. BTW, i am using suse 12.1 with gnome 3

So either You have a configuration problem on your installation or it’s a GNOME nm-aplet bug which should be reported in bugzilla.

Which version of nm-aplet and GNOME are You using ?

Best regards, Greg

Gnome 3
and how to find that nm-aplet version?

I know, but if everything else fails, that’s better than nothing. Thinkanish, have you eventually checked whether my method works?

You need to be more specific about GNOME version (3.2 or 3.1 or the default version that comes with openSUSE 12.1). I use KDE exclusively. In order to check KDE plugin version You can use a command like this :

opensuse:~ # zypper info plasmoid-networkmanagement
Loading repository data...
Reading installed packages...


Information for package plasmoid-networkmanagement:

Repository: @System
Name: plasmoid-networkmanagement
Version: 0.9.1git20111027-1.11.2
Arch: i586
Vendor: obs://build.opensuse.org/KDE
Installed: Yes
Status: up-to-date
Installed Size: 326.0 KiB
Summary: NetworkManager client for KDE 4
Description: 
Network Management Plasma applet for controlling network connections
on systems that use the NetworkManager service.

You need to find the name of GNOME NetwrokManager plugin and run the command above with that package name. I’m guessing it’s this package :

opensuse:~ # zypper se "*Network*gnome*"
Loading repository data...
Reading installed packages...

S | Name                           | Summary                                        | Type      
--+--------------------------------+------------------------------------------------+-----------
  | NetworkManager-gnome           | GNOME applications for use with NetworkManager | package

Best regards,
Greg

Yeah your method works perfectly. Never again did my usb modem touched the resolv.conf file! rotfl!

@Glistwan: here is the output of the nm-applet - search for the applet and also the info about the applet


anish@linux-jmbg:~> zypper se "*Network*gnome*"
Repository 'cross-avr' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Packman Repository' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE-12.1-Update' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...

S | Name                            | Summary                       | Type      
--+---------------------------------+-------------------------------+-----------
i | NetworkManager-gnome            | GNOME applications for use -> | package   
  | NetworkManager-gnome            | GNOME applications for use -> | srcpackage
  | NetworkManager-gnome-lang       | Languages for package Netwo-> | package   
  | NetworkManager-novellvpn-gnome  | NetworkManager VPN support -> | package   
i | NetworkManager-openvpn-gnome    | NetworkManager VPN support -> | package   
i | NetworkManager-pptp-gnome       | NetworkManager VPN support -> | package   
  | NetworkManager-strongswan-gnome | NetworkManager VPN support -> | package   
i | NetworkManager-vpnc-gnome       | NetworkManager VPN Support -> | package   
anish@linux-jmbg:~> zypper info NetworkManager-gnome
Repository 'cross-avr' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Packman Repository' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE-12.1-Update' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...


Information for package NetworkManager-gnome:

Repository: openSUSE-12.1-Update
Name: NetworkManager-gnome
Version: 0.9.1.90-3.15.1
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 1.6 MiB
Summary: GNOME applications for use with NetworkManager
Description: 
This package contains GNOME utilities and applications for use with
NetworkManager, including a panel applet for wireless networks.
anish@linux-jmbg:~> 



@Glistwan:

Here is the info about the network manager.


anish@linux-jmbg:~> zypper se "*Network*gnome*"
Repository 'cross-avr' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Packman Repository' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE-12.1-Update' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...

S | Name                            | Summary                       | Type      
--+---------------------------------+-------------------------------+-----------
i | NetworkManager-gnome            | GNOME applications for use -> | package   
  | NetworkManager-gnome            | GNOME applications for use -> | srcpackage
  | NetworkManager-gnome-lang       | Languages for package Netwo-> | package   
  | NetworkManager-novellvpn-gnome  | NetworkManager VPN support -> | package   
i | NetworkManager-openvpn-gnome    | NetworkManager VPN support -> | package   
i | NetworkManager-pptp-gnome       | NetworkManager VPN support -> | package   
  | NetworkManager-strongswan-gnome | NetworkManager VPN support -> | package   
i | NetworkManager-vpnc-gnome       | NetworkManager VPN Support -> | package   
anish@linux-jmbg:~> zypper info NetworkManager-gnome
Repository 'cross-avr' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'Packman Repository' is out-of-date. You can run 'zypper refresh' as root to update it.
Repository 'openSUSE-12.1-Update' is out-of-date. You can run 'zypper refresh' as root to update it.
Loading repository data...
Reading installed packages...


Information for package NetworkManager-gnome:

Repository: openSUSE-12.1-Update
Name: NetworkManager-gnome
Version: 0.9.1.90-3.15.1
Arch: x86_64
Vendor: openSUSE
Installed: Yes
Status: up-to-date
Installed Size: 1.6 MiB
Summary: GNOME applications for use with NetworkManager
Description: 
This package contains GNOME utilities and applications for use with
NetworkManager, including a panel applet for wireless networks.
anish@linux-jmbg:~> 


and my gnome version is 3.2.1

So now You’ve got all the information needed for a bug report :slight_smile: Before that You could try creating a new user and see if that works there. If it’s not working on a new user account than I think You should report into bugzilla :
https://bugzilla.novell.com/index.cgi

The same login as for the forums works there.

Best regards,
Greg