1

I've been using Ubuntu 14.04 LTS for almost one and half years now. This problem hasn't ever happened before. The bar at the top shows that I'm connected to WiFi/ethernet, but when I try to connect to, say Google, I'm unable to get to it. Chrome says "This site can't be reached".

EDIT_0 (some more info, don't know if this is useful; I already mentioned this in a comment to one of the answers): I'm using a dual-boot machine, running Windows 10 and Ubuntu 14.04. Both wired and wireless network connections work absolutely fine on Windows. Also, I've tried two different mobile hotspots, with the same result, i.e. works in Windows but not in Ubuntu.

EDIT: the diagnostics output can be found here (https://pastebin.com/2FSvfwKq)

EDIT2: Diagnostics run as suggested by @David Foerster. Results are as follows [pastebin link is https://pastebin.com/zGseXr1d ]:

jarvis@jarvis-Inspiron-5558:~$ ping -c4 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics 
---4 packets transmitted, 0 received, 100% packet loss, time 3024ms

jarvis@jarvis-Inspiron-5558:~$ ping6 -c4 2001:4860:4860::8888
connect: Network is unreachable

jarvis@jarvis-Inspiron-5558:~$ host google.com
;; connection timed out; no servers could be reached
10
  • Welcome to Ask Ubuntu! Could you please run the network diagnostics and edit your question to include a link to the result? I know it may seem a bit overwhelming for a novice but your info so far is a bit vague and the diagnostics will likely cover all options that may cause your issue. Thanks. Jun 4, 2017 at 0:57
  • @David Foerster: I've attached the output in a pastebin link. Please advise what to do next.
    – Arkya
    Jun 5, 2017 at 4:45
  • @ArkyaChatterjee The reopen review for this question is almost completed already, and it looks like your question will probably be reopened within a few hours.
    – karel
    Jun 5, 2017 at 6:06
  • Ok, your network configuration found a route that appears to lead to the internet. Could you please run ping -c4 8.8.8.8, ping6 -c4 2001:4860:4860::8888, and host google.com and edit your question to include their output? Thanks. Jun 5, 2017 at 7:48
  • I have done the same, kindly have a look. Thanks
    – Arkya
    Jun 5, 2017 at 10:36

3 Answers 3

3
+50

SOLVED: It turns out the problem was a firewall issue. Hopefully OP will find the specifics and update the original post. For those wanting to understand how online tech support works, the comments show the step by step approach used to identify then solve the problem.


I'd start by removing the Wifi as a possible source of problems. Connect directly to your router using an ethernet cable. Next try and ping the router on its IP (I'd expect this to be something like 192.168.1.1), but "ip addr" will tell you.

I can see that your Wifi is on 192.168.43.146 which seems fairly normal, so you could just try pinging/connecting to the gateway using a web browser http://192.168.43.1.

Either Wifi gateway IP or ethernet gateway IP should bring up your router's web UI.

If that works and you have other devices that connect to the internet via this router (i.e. a phone), then the issue is likely to be firewall type issues e.g. iptables, AppArmor, ufw, etc.

If you can't reach your router's web UI then it is likely that you have some odd DHCP configuration that is not giving out the correct gateway for your PC. Try manually configuring the ethernet interface with an unused IP that is in your subnet e.g. 192.168.1.111. This is also much easier to get right when using a cable rather than wifi. If that works and you are connected, then you could just run with it by making sure that IP is never given out by your router (check you router config), but it would be better to find out why and fix it.

15
  • I'm sorry, this might be a noob question.. So this is a college wifi, and I can't really connect to the wifi router as such. However there are some ethernet cables lying around which connect to the same network. That should do, right?
    – Arkya
    Jun 8, 2017 at 4:38
  • Also, I don't have access to the router config, since it's a college network.
    – Arkya
    Jun 8, 2017 at 8:20
  • I had assumed you were on a home network, and knowing that this works for the same machine running windows makes a huge difference. Can you ping the wifi gateway e.g. ping 192.168.43.1 Also can you ping another device on the subnet e.g. your phone's IP or a server on the network. It seems you are connected to the wifi, but your network route is wrong. In my experience this is usually a problem with your gateway configuration but there are many other possibilities. If you dual boot in windows, what is the output from ipconfig?
    – Martin
    Jun 8, 2017 at 9:31
  • 2
    sudo iptables-save > /root/firewall.rules; iptables -F; iptables -X; iptables -t nat -F; iptables -t nat -X; iptables -t mangle -F; iptables -t mangle -X; iptables -P INPUT ACCEPT; iptables -P FORWARD ACCEPT; iptables -P OUTPUT ACCEPT; Then do: sudo ufw disable
    – Martin
    Jun 9, 2017 at 14:13
  • 1
    Well you learn something new every day! I was wrong, ufw is iptables. A better explanation is wiki.ubuntu.com/UncomplicatedFirewall . Because of the "sudo iptables -F" I think that means you currently do not have any firewall even though you've now turned it back on using "sudo ufw enable". Check out the link and configure your iptables using ufw to suit your needs.
    – Martin
    Jun 12, 2017 at 13:25
0

Check your Wi-Fi network with other devices if you get internet access on them. Only then can you say that your device has a problem. If you don't get internet on other devices also, then it's the problem with the network.

You can also try to connect to your network router with a lan cable(if possible) and check if your network is culprit.

If you find out that that the problem is with your device, then you can try:

  • Restarting the network manager by typing the following code in terminal and entering the administrator password

    sudo service network-manager restart

  • Restarting your device

  • Forget your Wi-Fi network and connect to it freshly(see the 2nd answer in this https://askubuntu.com/a/284024/574724 )

  • Change your Wi-Fi driver under Additional Drivers in Software and Updates option of settings.

  • Restarting your router

It is more likely to be a problem with your network as you are already connected to your Wi-Fi router.

18
  • Tried both restarting device, and network-manager to no avail. How exactly do I check the WiFi driver though? Could you please explain?
    – Arkya
    Jun 3, 2017 at 9:15
  • I only have NVIDIA driver showing up there. Along with the open source variant of that. I can't see any WiFi driver under "additional drivers".
    – Arkya
    Jun 3, 2017 at 9:25
  • Since you are already connected to wifi, it is more likely a problem with the network than with the Wi-Fi adapter or your machine. Please check your network or contact your network admin
    – Yaksha
    Jun 3, 2017 at 9:48
  • the network works perfectly fine on my android smartphone. same for windows on the same laptop (I have a dual boot machine)
    – Arkya
    Jun 3, 2017 at 9:52
  • So sorry to hear that... Could you add some screenshots on "connected to Wi-Fi"?
    – Yaksha
    Jun 3, 2017 at 9:59
0

I am a little confused as to why your wireless ip address changes (as I'm going through your initial listing to the more recent and windows set-up).

Does your windows installation require some sort of authentication or a special program your school supplied before allowing you access to the network, or even the use of a proxy for internet access?

In any case, forcing a dhcp re-sync may fix your problem, if it is at the local interface level.

First run

ifconfig |grep inet

for your wireless interface

sudo dhclient wlan0

for your wired interface

sudo dhclient eth0

then again

ifconfig |grep inet

and paste your output. Let's see if your network address has changed.

7
  • No, there is no special program in windows that needed to be used to get connected. Just needed to manually configure some of the settings (I don't think it involved any proxy settings, but feel free to go through this, especially the "Connecting to the wifi (iiscwlan)" section.
    – Arkya
    Jun 12, 2017 at 6:54
  • so there is a proxy required for internet access, although that does not explain why you can ping from windows but not linux. Can you provide the results for the commands in my answer please.
    – sergtech
    Jun 12, 2017 at 8:32
  • sudo dhclient eth0 is not giving any output. The rest can be found here
    – Arkya
    Jun 12, 2017 at 10:05
  • I can see you're connected to both the wireless and wired network at this point. Have you set up your proxy in your web browser as it says in the guide you linked? Can you ping noauthproxy.serc.iisc.ernet.in?
    – sergtech
    Jun 12, 2017 at 11:20
  • No, I haven't done any manual proxy setup. Yes, I think I can ping. Here is what I get.
    – Arkya
    Jun 12, 2017 at 11:29

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .