Jump to content

Some websites not loading - Arch Linux

Hi there!

So yesterday I installed Arch Linux with KDE on an old computer and also in a virtual machine (VirtualBox). Both installations seem to work fine and I can use them regularly.

But there was one issue (on both installations): Many websites won't load. I can't even ping them. Websites like Youtube, Google, etc. work fine. But other ones like Reddit, Twitter, Github are just unable to load. Because of that I also can't install specific packages and apps.

What should I do to fix the issue? Thanks in advance.

Link to comment
Share on other sites

Link to post
Share on other sites

You tried switching networks? If you have wifi on your system you should try hotspotting to your system and see if that makes a difference.

Link to comment
Share on other sites

Link to post
Share on other sites

What does "unable to load" mean, exactly? Does the browser report some type of DNS error, a security/certificate error, does it never stop loading, …?

 

Right now, this sounds like a network issue more than anything. Which DNS server are you using? If possible, install "dnsutils"

sudo pacman -S dnsutils

 

Then try

nslookup <hostname that doesn't work in the browser>.

An alternative to "nslookup" would be "dig". Or you can try curl (or wget), see if they report any type of error.

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

21 minutes ago, Eigenvektor said:

What does "unable to load" mean, exactly? Does the browser report some type of DNS error, a security/certificate error, does it never stop loading, …?

 

Right now, this sounds like a network issue more than anything. Which DNS server are you using? If possible, install "dnsutils"

sudo pacman -S dnsutils

 

Then try

nslookup <hostname that doesn't work in the browser>.

An alternative to "nslookup" would be "dig". Or you can try curl (or wget), see if they report any type of error.

So basically the browser replies with "unable to connect". Curl responds with a "curl: (7) Failed to connect to www.github.com port 80 after 5028 ms: Network is unreachable" and also ping replies with "Destination Net Unreachable". It basically doesn't connect at all. I also tried changing DNS-Server twice, but it did not work.

Link to comment
Share on other sites

Link to post
Share on other sites

are you sure you're not behind some local network firewall that's blocking those websites? did you install anything of the sort on your system?

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, LaggyNacho said:

So basically the browser replies with "unable to connect". Curl responds with a "curl: (7) Failed to connect to www.github.com port 80 after 5028 ms: Network is unreachable" and also ping replies with "Destination Net Unreachable". It basically doesn't connect at all. I also tried changing DNS-Server twice, but it did not work.

Both of these messages indicate a routing error, rather than a DNS error. Try both

ip addr show
ip route show

The first one should show your network card(s). The second one should show default route(s) for your network. Make sure that the IP address of the default route is on same network as your network card.

 

If you try nslookup or dig, do you get an answer that looks plausible?

nslookup www.github.com
…

Non-authoritative answer:
www.github.com	canonical name = github.com.
Name:	github.com
Address: 140.82.121.3

 

dig +noall +answer www.github.com

www.github.com.		3563	IN	CNAME	github.com.
github.com.		60	IN	A	140.82.121.4

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, Eigenvektor said:

Both of these messages indicate a routing error, rather than a DNS error. Try both

ip addr show
ip route show

The first one should show your network card(s). The second one should show default route(s) for your network. Make sure that the IP address of the default route is on same network as your network card.

 

If you try nslookup or dig, do you get an answer that looks plausible?

nslookup www.github.com
…

Non-authoritative answer:
www.github.com	canonical name = github.com.
Name:	github.com
Address: 140.82.121.3

 

dig +noall +answer www.github.com

www.github.com.		3563	IN	CNAME	github.com.
github.com.		60	IN	A	140.82.121.4

Yes my IP adress on the default route seems to be on the same network as the network card.

 

Also when doing nslookup and dig for github.com (which is not loading on my machine), the results are basically same like in your answer.

 

So what does this mean?

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, LaggyNacho said:

Hi there!

So yesterday I installed Arch Linux with KDE on an old computer and also in a virtual machine (VirtualBox). Both installations seem to work fine and I can use them regularly.

But there was one issue (on both installations): Many websites won't load. I can't even ping them. Websites like Youtube, Google, etc. work fine. But other ones like Reddit, Twitter, Github are just unable to load. Because of that I also can't install specific packages and apps.

What should I do to fix the issue? Thanks in advance.

It is a Pi-hole. In order to configure it, you have to read this official arch documentation:

https://wiki.archlinux.org/title/Pi-hole

Link to comment
Share on other sites

Link to post
Share on other sites

25 minutes ago, Sauron said:

are you sure you're not behind some local network firewall that's blocking those websites? did you install anything of the sort on your system?

My network seems to be fine. Also every other device (Windows, Android, etc.) (but not an Arch installation) seem to work in this network.

Refering to my local machine I am not aware of installing anything that could potentially block websites or similar. Also I did not touch my local firewall settings.

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, FUIT1985 said:

It is a Pi-hole. In order to configure it, you have to read this official arch documentation:

https://wiki.archlinux.org/title/Pi-hole

Is a Pi-hole necessarely needed? Or what did you mean by this comment? I think this is more of a configuration mistake done by myself or wrong installation files that can be fixed.

Link to comment
Share on other sites

Link to post
Share on other sites

16 minutes ago, LaggyNacho said:

My network seems to be fine. Also every other device (Windows, Android, etc.) (but not an Arch installation) seem to work in this network.

Refering to my local machine I am not aware of installing anything that could potentially block websites or similar. Also I did not touch my local firewall settings.

did you configure any specific DNS service? try using google's 8.8.8.8

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, LaggyNacho said:

Is a Pi-hole necessarely needed? Or what did you mean by this comment? I think this is more of a configuration mistake done by myself or wrong installation files that can be fixed.

In order to understand what a pi-hole is, you should read the documentation and eventually disable it. In any case, check the firewall level of the modem-router and temporarily try to lower it. Do it temporarily even on the pc hosting the virtual machine.

Maybe it's just the latter. Arch is mischievous with firewalls. Also check /etc/hosts

 https://man.archlinux.org/man/hosts.5

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, Sauron said:

did you configure any specific DNS service? try using google's 8.8.8.8

I did. I tried a few, but it always made matters worse, because afterwards there was no internet at all. Maybe I am also just configuring it the wrong way? I am not sure. @Sauron

Link to comment
Share on other sites

Link to post
Share on other sites

1 minute ago, FUIT1985 said:

In order to understand what a pi-hole is, you should read the documentation and eventually disable it. In any case, check the firewall level of the modem-router and temporarily try to lower it. Do it temporarily even on the pc hosting the virtual machine.

Maybe it's just the latter. Arch is mischievous with firewalls. Also check /etc/hosts

 https://man.archlinux.org/man/hosts.5

Okay thanks for the reply, I will give a closer look to what you said. Are there any specific things I should check in /etc/hosts? @FUIT1985

Link to comment
Share on other sites

Link to post
Share on other sites

2 minutes ago, LaggyNacho said:

Okay thanks for the reply, I will give a closer look to what you said. Are there any specific things I should check in /etc/hosts? @FUIT1985

Check the ip addresses

Link to comment
Share on other sites

Link to post
Share on other sites

17 minutes ago, LaggyNacho said:

Yes my IP adress on the default route seems to be on the same network as the network card.

Also when doing nslookup and dig for github.com (which is not loading on my machine), the results are basically same like in your answer.

So what does this mean?

If nslookup/dig can resolve an IP for GitHub, it sounds like DNS is working properly. From your description, routing seems to be set up correctly as well.

 

It's possible something is blocking outgoing requests or preventing answers from coming back in. You could try checking if HTTP(S) is shown as open for GitHub, for example. Try the same thing for a site that works (google.com?). Both ports should be shown as open/reachable.

nmap -P0 -p 80,443 github.com
…
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

Just now, FUIT1985 said:

Check the ip addresses

What should be there?

I have:

 

127.0.0.1     localhost

::1                localhost

127.0.1.1     arch.localdomain arch

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Eigenvektor said:

If nslookup/dig can resolve an IP for GitHub, it sounds like DNS is working properly. From your description, routing seems to be set up correctly as well.

 

It's possible something is blocking outgoing requests or preventing answers from coming back in. You could try checking if HTTP(S) is shown as open for GitHub, for example. Try the same thing for a site that works (google.com?). Both ports should be shown as open/reachable.

nmap -P0 -p 80,443 github.com
…
PORT    STATE SERVICE
80/tcp  open  http
443/tcp open  https

using nmap google.com and github.com display the same output (Eventough google works and github does not). Both of both websites show "filtered" as State on all listed ports.

Link to comment
Share on other sites

Link to post
Share on other sites

45 minutes ago, LaggyNacho said:

I did. I tried a few, but it always made matters worse, because afterwards there was no internet at all. Maybe I am also just configuring it the wrong way? I am not sure. @Sauron

well... how are you configuring it? can you ping 8.8.8.8?

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

19 minutes ago, LaggyNacho said:

using nmap google.com and github.com display the same output (Eventough google works and github does not). Both of both websites show "filtered" as State on all listed ports.

Does Google really work… or are you seeing cached results? Because filtered would indicate you can't actually connect to it using http(s). If you

curl https://www.google.com

do you get a HTML document back? You can also add "-vvI" (verbose verbose Information). Check if you get a proper SSL certificate from issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

7 minutes ago, Sauron said:

well... how are you configuring it? can you ping 8.8.8.8?

No, I can't ping to 8.8.8.8. @Sauron

 

I tried to configure it by somehow changing the nameserver IPs in the /etc/resolv.conf file. I am not sure if it is the right way, but at this point I do not even know if DNS is actually the point of error.

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Eigenvektor said:

Does Google really work… or are you seeing cached results? Because filtered would indicate you can't actually connect to it using http(s). If you

curl https://www.google.com

do you get a HTML document back? You can also add "-vvI" (verbose verbose Information). Check if you get a proper SSL certificate from issuer: C=US; O=Google Trust Services LLC; CN=GTS CA 1C3

Yes I do get a HTML document back. And I can assure you and I am definitely sure that there is a proper SSL certificate.  So yes, again Google does really work.

Link to comment
Share on other sites

Link to post
Share on other sites

29 minutes ago, LaggyNacho said:

No, I can't ping to 8.8.8.8. @Sauron

 

I tried to configure it by somehow changing the nameserver IPs in the /etc/resolv.conf file. I am not sure if it is the right way, but at this point I do not even know if DNS is actually the point of error.

cat /etc/resolv.conf

Can you write here the output?

Link to comment
Share on other sites

Link to post
Share on other sites

11 minutes ago, FUIT1985 said:
cat /etc/resolv.conf

Can you write here the output?


if the syntax of the above file is correct, you can use this command

 

sudo systemctl start dhcpcd.service

If after the ping to 8.8.8.8 works, you need to write in (or create it with an editor) /etc/systemd/system/dhcpcd@.service.d/no-wait.conf:

[Service]
ExecStart=
ExecStart=/usr/bin/dhcpcd -b -q %I

 

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, LaggyNacho said:

No, I can't ping to 8.8.8.8. @Sauron

That's indicative of a significant problem with your network configuration.

 

If you have a "normal" router configuration your system's IP address should be something like 192.168.1.X or 192.168.0.X. Is this the case? Can you ping and access your router?

Don't ask to ask, just ask... please 🤨

sudo chmod -R 000 /*

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×