No internet connection in terminal(error 403)

I was trying to update my system using pacman -Syu but it says

 core.db failed to download
error: failed retrieving file 'core.db' from <filtered> : The requested URL returned error: 403
error: failed to synchronize all databases (failed to retrieve some files)

I also tried connecting to other addresses using curl -I but it would return

HTTP/2 403 
date: Sat, 14 May 2022 06:17:21 GMT
content-type: text/html; charset=UTF-8
cache-control: max-age=15
expires: Sat, 14 May 2022 06:17:36 GMT

and so on...

even if I ping some address like ping, it would get stuck and when I cancel the job, the full error message would be like this

PING ( 56(84) bytes of data.
--- ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 9132ms

but when I ping localhost, it says this:

PING localhost(localhost (::1)) 56 data bytes
64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.021 ms
64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.254 ms
64 bytes from localhost (::1): icmp_seq=3 ttl=64 time=0.142 ms
64 bytes from localhost (::1): icmp_seq=4 ttl=64 time=0.032 ms
64 bytes from localhost (::1): icmp_seq=5 ttl=64 time=0.034 ms
--- localhost ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4042ms
rtt min/avg/max/mdev = 0.021/0.096/0.254/0.090 ms

by the way, internet connectivity is working in browsers and other GUI based programs like pamac-gui etc.(but pamac is not able to actually update the system, says unable to get core.db just like pacman, but it does show the pending updates)

I think it’s some network configuration issue, but I can’t figure out what is actually wrong.
Please let me know if you guys have any idea what is causing this problem.

I don’t know if I have explained my situation properly or not, so feel free to let me know if you need me to do another checks to get you better error messages to understand what is going on

Thanks in advance.

This means you have internet connectivity. Cloudflare doesn’t allow curl. You should try a more simple website. That you don’t get a ping back is also on some networks not that unusual.

Back to your first problem. Try a different mirror.

Changing to a different server fixed pacman. Seems like my old mirror is ded now. I did it using pamac-gui’s preferences.
I was able to change servers but while it was refreshing the mirror list, I saw it saying:

Internet connection seems to be down, ranking mirrors will not work.
Mirrorlist will be generated in a random fashion

While it was still updating the mirrors, which should not happen if internet is not connected. So I am confused about what’s going on.

Thank you very much for this valuable information.
But There are no hardware problems, I had checked it before, and I have checked once again using this info you have provided.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.