Ubuntu: Problem resolving many web pages



Question:

I am presently running Ubuntu 12.04 and using Chrome/Firefox along with OpenDNS (have tried Google Public DNS as well as DNS of my ISP).

Suddenly, a lot of websites that I visit frequently don't load anymore. Some of them are imgur, yahoo, fed-sudoku, microsoft and addons page of firefox. I am sure there are many more that won't load.

I have Windows 7 in Dual-Boot and there are no problems whatsoever in opening these pages on Windows.

Brief History

Two weeks ago I installed Ubuntu 12.10. I faced this issue right away. I thought something must have gone wrong with the installation, so I removed Ubuntu 12.10 and instead installed Lubuntu 12.10, but the issue persisted. So, I tried opening these webpages in Live Environments (of Ubuntu 12.10, Lubuntu 12.10 and Ubuntu 12.04.1) from USB. The issue was there for Ubuntu 12.10 and Lubuntu 12.10. However, I was able to access these webpages from Ubuntu 12.04.1. So, I installed 12.04.1 on my HardDisk. Everything on 12.04 was fine till yesterday; but suddenly, these sites don't load anymore. Windows 7 in Dual-Boot works flawlessly.

Updates

(1) In response to Zhang's Answer to check basic terminal commands - I have used both OpenDNS and GooglePublic DNS to test these commands (Restarted my PC in between). These are the terminal outputs while using OpenDNS and while using GooglePublicDNS.

(2) This is the result of ifconfig - Pastebin Link.

(3) Thereafter I tried to use wget to check if the problem was with the Browser. However, it didn't work for webpages which are not loading in my browser. This is the Pastebin Link showing it for Google(works) and Yahoo(doesn't work).

(4) Then followed the instructions listed at noobslab to disable IPV6. Also, restarted my PC. However, it didn't help either.

(5) Then, I edited my Wired Connection through Network-Manager to ignore IPV6. After that, I tried to open Yahoo in Browser - it did load the first time. However, when I tried again, it didn't load. Other problem sites didn't load at all.

(6) Again tried wget. However, this time passed the argument -4 to it; ie; wget -4 www.yahoo.com. But once again, didn't get any response.

(7) Then, tried to fiddle with MTU. Followed this link to check what is the maximum that I can set. For me, the maximum possible was 10324. Also tried other values like 1500, 1492, 1452 and 100. But this didn't help either.

(8) Re-installed Ubuntu 12.04.1, wiping out the previous installation and as such all other changes. Also installed all the available updates. For the first half-an-hour, I was able to load all the webpages - including the ones which had problem. But lateron, I have the same issue as earlier - not able to load pages like yahoo, imgur, microsoft, fed-sudoku, etc.

(9) Question by laurent

From wget pastebin info in the question, the problem is not DNS as the wget and dig commands reach Yahoo's IP. This said, I don't know why nothing downloads with wget! Have you set a firewall? (you can check with sudo iptables -L). In ifconfig results, there are 2 interfaces, ppp0 and eth0. Which one should be used to connect to internet? Could you post the result of route command? Obs: eth0 has no IPV4 address so I think it is not properly configured (how is /etc/network/interfaces?)

Here is the Pastebin Link for terminal outputs of sudo iptables -L ; route and cat /etc/network/interfaces. I am not running any firewall. It's a clean install of Ubuntu 12.04.1. ppp0 is used to connect to the internet (this takes username and password which was given by my ISP) and eth0 is the Intel's OnBoard LAN which connects the modem through ethernet port.

(10) Tried to append nameserver 208.67.222.222 line in /etc/resolv.conf (since, I am using OpenDNS). But this didn't help (even after restart). So reverted the changes back. This is also a part of answer provided by laurent - it's required if I want to use OpenDNS.

Other Info

  • I have an ADSL modem (not a router) connected to the PC with an Ethernet Port. To connect to the internet, I have a DSL Connection. So, I use PPPOE to connect.
  • Terminal Output for System Information sudo lshw -C network ; cat /etc/resolv.conf ; ifconfig -a - Pastebin Link


Solution:1

Part 1 - PPPoE connection not working

I would try disabling the Network Manager and configuring the network manually like explained in Ubuntu help ADSLPPPoE. Use the Config with pppoeconf part first which is basically running sudo pppoeconf and answering the questions. As you need to use a different DNS server than the one of your ISP, answer no to the question about using the peer DNS server.

Optional if your internet connection is not restarted at boot: You can edit nano /etc/rc.local, add the following lines before the exit line and reboot to test it.

killall pppd  ifconfig eth0 up  pon dsl-provider  

Network manager won't be used when you use the manual config but you can disable it clicking on it and de-selecting the option enable network (and enable wireless if present). If disabling only doesnt work, you can also uninstall it with sudo apt-get remove network-manager and after sudo apt-get autoremove to clean the auto-installed packages.

Part 2 Changing default ISP DNS server to openDNS

I found here that the best way to use a static DNS with resolvconf is to add the nameserver in /etc/network/interfaces or to add it in /etc/resolvconf/resolv.conf.d/head. As your interfaces are automatically configured (dhcp) you have to use the head file:

sudo nano /etc/resolvconf/resolv.conf.d/head  

and add at the end:

nameserver 208.67.222.222  nameserver 208.67.220.220  

Limitations

  • You cannot use Network-Manager to connect. However, this automatically gets you connected to the internet. Otherwise, you can connect by running pon dsl-provider. To disconnect, you need to be sudo, so running sudo poff disconnects.
  • [This issue is only with Ubuntu 12.04.] While Booting Ubuntu (with Modem turned off or while it is still trying to establish a link with the ISP) - Ubuntu waits for loading Network-Configuration for about 2 mins and thereafter boots without Network-Configuration. To get online you have to run pon dsl-provider.

Fixes to remove the previous tests made (not needed in other cases):

As we deleted the resolv.conf symlink before, we need to recreate it (not needed on new install):

cd /etc  sudo rm resolv.conf  sudo ln -s ../run/resolvconf/resolv.conf /etc/resolv.conf  

If this works, you can revert the changes in /etc/dhcp/dhclient.conf we made before.


Solution:2

  1. Verify that your client can communicate with the openDNS servers

    sudo traceroute -n -w 2 -q 2 -m 30  208.67.222.222  

    If the last line of the output does not list 208.67.222.222 as the final hop, or if there are significant timeouts, there may be a network problem preventing you from contacting openDNS servers.

  2. Verify that openDNS can resolve the selected hostname

    dig @208.67.222.222 www.difficult.com.        

    At the command prompt, run the following command, replacing www.difficult.com. with the name that you were having difficulty resolving (putting a period at the end of the name to avoid problems with domain suffixes and search lists)

    If the output does not show an answer for the hostname, continue:

  3. Verify that another open resolver can resolve the selected hostname

    dig @8.8.8.8 www.difficult.com.  dig @8.8.8.4 www.difficult.com.  dig @4.2.2.1 www.difficult.com.  dig @4.2.2.2 www.difficult.com.  

    If you do get a successful result, there may be a problem with openDNS

  4. Check to see if the authoritative nameservers are correct

    intoDNS is very helpful.


UPDATE:
This answer could not deal with the problem , just for troubleshooting.
If DNS resolve worked fine,go to see laurent's answer furthermore.


Reference:public DNS troubleshooting


Solution:3

The original problem could possibly have been solved by doing the following.

sudo apt-get install resolvconf  sudo dpkg-reconfigure resolvconf  


Solution:4

Append this line to you /etc/resolv.conf:

nameserver 8.8.8.8  


Solution:5

Maybe you can try disabling the dnsmasq:

sudo vim /etc/NetworkManager/NetworkManager.conf  

Put a # in front of dns=dnsmasq

Then:

sudo restart network-manager  

I have a problem of resolving some websites after I installed 12.04 and 12.10. After I disabled dnsmasq everything worked fine.

If this helps, you can then install the full dnsmasq service and put your favourite DNS provider in /etc/resolvconf/resolv.conf.d/tail.


Solution:6

Apparently, the problem is how Ubuntu deals with DSL connections. I failed to configure my DSL connection as suggested by the experts.

As a work around, I'm using TOR, since there are only handful of websites which are affected by it.


Solution:7

Same problem occurred here (ASUS EeePC 1015BX - Ubuntu 12.10 - AMD C-60 system). GEditing the /etc/resolv.conf file (sudo -H gedit /etc/resolv.conf) and replacing the nameserver 127.0.1.1 line with the following

nameserver 208.67.222.222  nameserver 208.67.220.220  

solved the problems.

You can make this permanent by using these procedures.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »