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
anddig
commands reach Yahoo's IP. This said, I don't know why nothing downloads with wget! Have you set a firewall? (you can check withsudo iptables -L
). Inifconfig
results, there are 2 interfaces, ppp0 and eth0. Which one should be used to connect to internet? Could you post the result ofroute
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
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 runningsudo pppoeconf
and answering the questions. As you need to use a different DNS server than the one of your ISP, answerno
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 theexit
line and reboot to test it.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
(andenable wireless
if present). If disabling only doesnt work, you can also uninstall it withsudo apt-get remove network-manager
and aftersudo 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 thehead
file:and add at the end:
Limitations
pon dsl-provider
. To disconnect, you need to be sudo, so runningsudo poff
disconnects.Network-Configuration
for about 2 mins and thereafter boots without Network-Configuration. To get online you have to runpon 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):If this works, you can revert the changes in
/etc/dhcp/dhclient.conf
we made before.Verify that your client can communicate with the openDNS servers
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.
Verify that openDNS can resolve the selected hostname
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:
Verify that another open resolver can resolve the selected hostname
If you do get a successful result, there may be a problem with openDNS
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
Append this line to you
/etc/resolv.conf
:The original problem could possibly have been solved by doing the following.
Maybe you can try disabling the
dnsmasq
:Put a
#
in front ofdns=dnsmasq
Then:
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
.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 thenameserver 127.0.1.1
line with the followingsolved the problems.
You can make this permanent by using these procedures.
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.
Well, I just write this command whenever this stops working, I still believe it to be a bug, or maybe I am doing something wrong with my pc
It should start working ( if there is a internet connection offcourse). But if it doesn't work, try updating the dns records and then go for the above command again. It shold work.
Same issue i have faced in my laptop with Ubuntu 20.04.
This steps fixed my issues