Firstly I’m talking about the default browser Mozilla Firefox installed on Ubuntu 18.10.
This is really really strange. I’ve tried publishing a local directory-listing HTTP server at localhost using python3
like this:
sudo python3 -m http.server 80
After that the simple HTTP server runs fine and I can test it by browsing the directory from another machine in the same LAN.
Well however right inside the Ubuntu machine, I cannot browse that localhost site, the waiting indicator in the page tab just runs forever before throwing out The connection has timed out
, here is what I’ve tried:
http://localhost http://[ip_address]
nothing worked. Of course I’ve tried turning off all proxy as well.
There must be something wrong with this machine’s network. Actually it has an Internet connection (LAN), it can access Google (and some domestic sites via proxy). However almost other sites are not accessible (so I can’t even run basic updates from Ubuntu server). It’s just like an offline/disconnected machine.
I can still ping the localhost (as well as the IP).
I’ve even tried checking port status using command sudo ufw status
, and it shows this:
To Action From -- ------ ---- 22/tcp ALLOW Anywhere 80/tcp ALLOW Anywhere 23/tcp ALLOW Anywhere 443/tcp ALLOW Anywhere 22/tcp (v6) ALLOW Anywhere (v6) 80/tcp (v6) ALLOW Anywhere (v6) 23/tcp (v6) ALLOW Anywhere (v6) 443/tcp (v6) ALLOW Anywhere (v6)
So it looks OK, isn’t it?
I’m new to Linux as well as Ubuntu and really I’ve never encountered something like this in Windows (localhost access should always be OK, but this time access from outside is OK whereas from inside not OK, so ridiculous).
I hope someone here could give me some suggestion to solve this, but please note that my machine is nearly offline (due to something wrong because it still has a working Internet wired connection proved by other working machines in the same LAN).