Can't browse the internet although I can ping www.google.com

7,695

Well, a good step is to start at the bottom and work up.

  1. Apparently you do have ip connectivity and routing because you can ping an external machine.

  2. Apparently you also have working DNS because you can resolve google.com to ping it.

  3. Can you open a tcp socket? Try telnet google.com 80 from the command line and see if you get 'connected' or not.

  4. Can you do http from the command line? How about wget -v http://google.com/robots.txt?

  5. If those all work, check a different graphical browser.

My guess is your firewall rules pass forwarded packets but block some essential packet to or from localhost.

Share:
7,695

Related videos on Youtube

Philippe Massé
Author by

Philippe Massé

Updated on September 18, 2022

Comments

  • Philippe MassĂ©
    Philippe Massé over 1 year

    I have a PC running Ubuntu 11.04 with 2 nics. eth0 is internet and eth1 in Internal Lan. eth0 is connected to the internet talks and receives the correct DHCP addresses from ISP. I can from this computer ping the DNS servers at my ISP, I can ping www.google.com and any other sites so the DSN's are working fine. I have a dhcp server on the lan side that serves up the ip addresses to my computers connected to the internal lan. I have a firewall between the two nics (eth0 and eth1). This computer is also the gateway for my internal lan computers to access the internet.

    What is more baffling is that any lan side computer (these are different flavours of Operating Systems i.e. ubuntu 10.04, Mac snow leopard, windows xp) all work fine, they can get to browse the internet using a range of browsers (firefox v3.6.22, safari, & ie) but here is the problem - the gateway computer can't browse the internet - this is the one that is running ubuntu 11.04, firefox 6.0.2. it also has a problem with even the ubuntu software centre which it can't download programs.

    Help is needed and it would be greatly appreciated, I've tried the usual stuff that is recorded on the forums like ipv6 etc. But all my other computers go through this one and they have no problems - it must be something to do with ubuntu 11.04. very puzzling... please help. cheers JJ

  • Philippe MassĂ©
    Philippe Massé over 12 years
    Just tried telnet ggogle.com 80
  • Philippe MassĂ©
    Philippe Massé over 12 years
    it returned trying 209.85.169.147... and is still trying. sorry don't have curl and can't download the program...
  • Philippe MassĂ©
    Philippe Massé over 12 years
    all the other computers on the lan can go through the firewall via gateway without any problems
  • jrg
    jrg over 12 years
    @toonie No need to use curl, updated answer so you can use wget, which is installed by default.
  • Philippe MassĂ©
    Philippe Massé over 12 years
    wget -v returned - resolving google.com... 209.85.168.104, ...105, ...106, connecting to google.com 209.85.169.104:80... it's been like that for a few mins now.
  • Philippe MassĂ©
    Philippe Massé over 12 years
    jrg - btw thanks for the help. just tried sudo /sbin/rout -n on one on the computers on the lan and there is a correct gateway entry - however if I do the same on the main computer (that is my gateway) - there is no entry for a gateway on eth1 - I'm going to try to add an entry like the others. - then I'm off to bed...I really appreciated the help.
  • Philippe MassĂ©
    Philippe Massé over 12 years
    sorry typo should have been ---- sudo /sbin/route -n
  • Philippe MassĂ©
    Philippe Massé over 12 years
    it (route add) didn't work. i'll be at it for some time yet, however, it did stop my computer on the lan from working i.e. browsing, so I quickly got rid of it by route del... and guess what - i'm back in business on my lan computer...