Can’t connect to internet

None of my application programs running under Linux can access the internet. Router seems OK. Any ideas?

Too many ideas to write down here :D. We need more info. How do you try to connect? Is this a laptop, a desktop? Which desktop environment? Wired/Wireless? Wicked/Networkmanager? Such info makes it less of a shooting in the dark.

Well, I remembered I had a similar problem a while ago, so I looked up what “Wise Penguin” told me to do.

ip -s link
ip a
ip r
grep -v -e ‘^#’  /etc/resolv.conf
ping -c 4
ping -c 4

When I ran these commands everything looked good except for “/etc/resolv.conf” — nothing at all showed up, and when I ran it a few months ago it said “nameserver”. So I logged in as root and added the line “nameserver” to the file “/etc/resolve.conf” and voila! My internet connection works again.

So now I’m left wondering how this file was corrupted. I didn’t edit the file (until just now, when I put the necessary information back in). The only weird thing that has happened lately is that my mail client (“Kmail”) died unexpectedly yesterday, so I filed a bug report.

Well, all’s well that ends well, I guess, but I do wonder how that file was corrupted. Thanks!

Your machine is set up as a DHCP client, normally at least one DNS server is assigned to you automatically.
If your machine isn’t set up as a DHCP client, you may have forgotten to configure that setting.

In any case…
You can always delete /etc/resolv.conf and reboot… the file will be re-created with whatever you have configured.
Any direct edits to /etc/resolv.conf will function only for the existing session, with your next reboot those edits will be lost. You should instead configure your DNS settings in YaST or NM if necessary, or follow the instructions in the comments in /etc/resolv.conf.


tsu2: It appears you’re not quite right. I just rebooted my system, and the file “etc/resolv.conf” is unaltered. I did see another file “etc/resolv.conf.netconfig” that was apparently created the last time I re-booted the system; the two files are identical (except that they have different names, and one was created about two hours before the other one).

Knurpht: Just to clarify, everything seems to be OK now. I have a desktop PC (32-bit) running the current Tumbleweed release (updated yesterday). I’m running the PLASMA5 desktop shell, KDE applications. I do have a wireless router, but this PC (my LINUX machine) is hard-wired to the router (an ethernet cable connects the EN port on the PC to slot #1 on my NETGEAR router). I guess I’m running “Wicked” – I see a bunch of messages about “Starting Wicked Network Manager” whenever I boot the system, and the application “KSysGuard” shows about 5 or 6 processes named “Wickedxxx” running when my system is operating. I didn’t try to tailor my Tumbleweed installation at all, except that I chose the “EXT4” file system – “BTFS” was giving me a lot of headaches for some reason. I have no earthly idea how the file “etc/resolv.conf” got corrupted. My internet stopped working all of a sudden, so I re-booted the system, and when that didn’t work I came to the forum for help. I was sure my ISP was working OK because I was able to update some firmware on my router – even though Firefox wouldn’t connect with the internet, it would connect with the router, so I logged in there as “admin” and verified that my connection was really OK, and updated the GUI interface (router firmware) while I was at it. Plus I could connect to the internet using the Wireless connection I use with my other PCs. Only the LINUX machine was malfunctioning.

As per contents /etc/resolv.conf should not be editted manually. Next time something like this happens, simply remove the file and do

rcnetwork restart

. And tsu is correct, the info should be provided through DHCP. Are you using static ip addresses ?

Thanks for the information about “rcnetwork”. I’ll have to read about that.

All the external addresses in my router are set automatically. Specifically, the router has this to say:

Does your internet connection require a login? No

Internet IP Address: Get dynamically from ISP.
IP address
IP Subnet Mask
Gateway IP Address

DNS Address: Get automatically from ISP
Primary DNS
Secondary DNS

(Although these addresses are set automatically, it appears that they might as well be static, because they never seem to change.)

No the addresses for the internal network. The outside addresses are assigned by you ISP. The inside addresses can be set to static or dynamically allocated through DHCP. If you did not assign any internal addresses then most likely it uses DHCP. But that is something need to be known for trouble shooting.

Oh. Of course, the Router is configured as the DHCP server for my LAN – is that what you’re asking about? I did not set any network parameters myself; I accepted the OpenSuse defaults, which, I’m pretty sure, are to let the router handle internal IP addresses. Anyway, my router says it’s doing that, and currently my LINUX machine has been assigned to My Ipad is currently, and the Windows machine out in my wife’s workshop is The printer (also directly connected to the router) is at These addresses rarely change, since most of the devices are on all the time. But a couple of months ago the LINUX machine was at (the Ipad was on the fritz for a while).

I did not tune in until now because others already started helping.
Normally these things are solved pretty soon. But I get the idea that you still have the problem you defined in what I quote here. Is that correct?

No, that’s incorrect. Adding the line “nameserver” to the file “etc/resolv.conf” fixed the problem. See my post dated 03 December, at 13:42.

I replied to a number of helpful posts that others put up here after the problem was resolved … I was just trying to be polite. Everyone here is so helpful and kind … anyway, please mark this problem closed (although I still have no idea how that one file was created incorrectly). dcb

Thanks for confirming the actual situation.

Enjoy openSUSE!