// Networking & Security

Diagnose Linux network problems

Tell the difference between missing IP, routing, DNS and remote service trouble.

When the web won't load, don't change ten settings at once. Test one layer at a time.

1. Is there a local address?

ip -brief address

Look for an interface with an IPv4 or IPv6 address appropriate for your network. Names often look like enp... for Ethernet or wlp... for Wi-Fi.

2. Is there a route?

ip route

A default route is commonly required for internet access.

3. Can you reach an IP address?

ping -c 3 1.1.1.1

This tests one public host, not the whole internet. Some networks block ping; failure alone does not prove there is no connectivity.

4. Does DNS resolve?

getent hosts example.org

If you can connect to IPs but hostnames fail, investigate configured DNS resolvers.

5. Can HTTPS respond?

curl -I https://example.org

Run it only if curl is installed. TLS certificate or proxy errors can reveal a different problem than DNS failure.

Remember the hotspot

When tethering through a phone, verify the phone's hotspot is on, has mobile data and permits your computer to connect. If your configuration uses a network manager, use that manager's commands rather than mixing in unrelated setup instructions.