Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My problem is that I cannot connect to simple HTTP web pages, only to HTTPS secured pages.

Any idea why this would be?

I don't have any proxies. I tested the connection with Windows 7 and it works fine. It's a problem I have with Ubuntu 12.04, with Firefox, Chrome, Midori.

I check the ufw status: it is off.

I performed the test with the curl command, and this is what came out without sudo:

alumno@Usuario:/usr/bin$ curl -I http://www.facebook.com
curl: (7) Failed to connect to 2a03:2880:2110:3f07:face:b00c:0:1: La red es inaccesible
alumno@Usuario:/usr/bin$ curl -I https://www.facebook.com
HTTP/1.1 302 Found
Location: http://www.facebook.com/unsupportedbrowser
P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
X-Content-Type-Options: nosniff
Set-Cookie: datr=FiraUZvP3gAvo3pe5lXNEPDQ; expires=Wed, 08-Jul-2015 02:55:18 GMT; path=/; domain=.facebook.com; httponly
Content-Type: text/html; charset=utf-8
X-FB-Debug: lUBLWH6lEqCWU4GKQS+YeN4/h0eyokinlDsP+aVye1o=
Date: Mon, 08 Jul 2013 02:55:18 GMT
Connection: keep-alive
Content-Length: 0

Then, logging as root, I realized that I could access both HTTP and HTTPS ...therefore, I think it must be a setting as root that does not allow me as user to navigate plain HTTP.

alumno@Usuario:/usr/bin$ sudo curl -I http://www.facebook.com
HTTP/1.1 302 Found
Location: http://www.facebook.com/unsupportedbrowser
Content-Type: text/html; charset=utf-8
X-FB-Debug: ScceJRZGdIwqrHt7QFAU2KTw22yKGunWaosuzH4paik=
Date: Mon, 08 Jul 2013 02:56:19 GMT
Connection: keep-alive
Content-Length: 0

alumno@Usuario:/usr/bin$ sudo curl -I https://www.facebook.com
HTTP/1.1 302 Found
Location: http://www.facebook.com/unsupportedbrowser
P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
X-Content-Type-Options: nosniff
Set-Cookie: datr=XSraUWaFBXw77lQ6vXR6utiI; expires=Wed, 08-Jul-2015 02:56:29 GMT; path=/; domain=.facebook.com; httponly
Content-Type: text/html; charset=utf-8
X-FB-Debug: uPnmroZoHqj/wGG1MB02Zzi5aU6Hlg2EMjlp+VCnD6Y=
Date: Mon, 08 Jul 2013 02:56:29 GMT
Connection: keep-alive
Content-Length: 0

How can I fix this situation and let users navigate using plain HTTP?

Thanks for your answers and corrections, and sorry for my delay in answering

(translation notes: "La red es inaccesible" = "Network is unreachable")

After disabling IPv6 and reboot, curl results remain the same.

alumno@Usuario:/usr/bin$ sudo sysctl -p
[sudo] password for alumno: 
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1

alumno@Usuario:/usr/bin$ curl -I http://www.facebook.com
curl: (7) Failed to connect to 2a03:2880:2110:cf07:face:b00c:0:1: La red es inaccesible
alumno@Usuario:/usr/bin$ curl -I https://www.facebook.com
HTTP/1.1 302 Found
Location: http://www.facebook.com/unsupportedbrowser
P3P: CP="Facebook does not have a P3P policy. Learn why here: http://fb.me/p3p"
X-Content-Type-Options: nosniff
Set-Cookie: datr=OqLaUaYiZdlz-h8tFxRV_4yf; expires=Wed, 08-Jul-2015 11:27:54 GMT; path=/; domain=.facebook.com; httponly
Content-Type: text/html; charset=utf-8
X-FB-Debug: 0SAZyJncyia1ASFHyLekiqAji2eEFFYbvxPltd0w/xU=
Date: Mon, 08 Jul 2013 11:27:54 GMT
Connection: keep-alive
Content-Length: 0
share|improve this question
    
please try curl or wget and post the error message here. – mnagel Jul 6 '13 at 1:23
    
Hmm, it's trying to connect to an IPv6 address. We can try disabling IPv6 and see what error curl gives us. Can you do sudo sh -c "echo '\nnet.ipv6.conf.all.disable_ipv6 = 1\nnet.ipv6.conf.default.disable_ipv6 = 1\nnet.ipv6.conf.lo.disable_ipv6 = 1' >> /etc/sysctl.conf" (note, that's all on one line; it's one command), then so sudo sysctl -p, then try curl again. – Alaa Ali Jul 8 '13 at 6:29
    
I'm facing the same situation here with a netbook exactly like yours ;) The thing is that after upgrade ubuntu I wanted to clean certain preinstalled packages with Computer Janitor and I think that that broke my network config. Have you solved that issue after all? Please contact me at juanmartindiaz at msn.com Thanks! – user259451 Mar 18 '14 at 9:18

Double check that you have no proxy installed.

Dash Home > Search for "Network" > Go to Network proxy > set to "None" > click "Apply system wide"

If you are still having problems, check if UncomplicatedFirewall is active.

sudo ufw status

If so, allow port 80.

sudo ufw allow 80
share|improve this answer

Your Browsers like Firefox and Chrome contain a list of many https website with hsts enabled on it. The list is called hsts list so this list allows user to be protected from ssl stripping attacks so anyone in your network can't sniff your content and it remains encrypted on the fly. So the websites with hsts are only able to open with https and even if you try typing http they will redirect you to https.And if some tries to attack the browser won't let you open these websites and show you error.

share|improve this answer
    
You can try flushing iptables and then save the new flushed rules and try then. >> #iptables -X >> #iptables -F >> #iptables-save > /etc/network/iptables.rules – J. white Jul 18 at 5:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.