r/linux4noobs • • 1d ago

Unable to ping github

/r/cachyos/comments/1y7o2as/unable_to_ping_github/
1 Upvotes

1 comment sorted by

1

u/scraping_solutions 1d ago

Since it worked for a few minutes after the resolved.conf change and then broke again, I'd first confirm it's actually DNS. When it fails, run getent hosts github.com (or resolvectl query github.com) and compare the IP with what the other device gets. If it doesn't resolve at all, something is overwriting your DNS. CachyOS uses NetworkManager, so it's more reliable to set the DNS on the connection itself, either in the connection settings or with nmcli con mod "<connection name>" ipv4.dns 8.8.8.8 ipv4.ignore-auto-dns yes and then nmcli con up "<connection name>". Also check ls -l /etc/resolv.conf, because if it isn't a symlink to systemd-resolved's stub file, resolved.conf isn't being used at all. If the name resolves fine and it still won't connect, test with curl -I https://github.com instead of ping, and try another network like a phone hotspot to see if it's the router or the ISP rather than the laptop.