the internet does not work
Go step by step from this machine out: its address, the router, the internet by number, then by name.
Steps
-
ip -br addrthe network interfaces and their addresses; one should be UP with an address (Linux)
-
ip routethe default route, through the router
-
ping -c 3 1.1.1.1reach the internet by number
-
ping -c 3 example.comreach it by name, which needs DNS
-
resolvectl statusthe DNS servers in use (systemd; else read /etc/resolv.conf)
-
curl -I https://example.coma whole web request, with the answer's headers
-
tracepath 1.1.1.1where on the way the packets stop
Notes
- Numbers work but names do not: DNS is the problem.
- No default route, or no address: the problem is the cable, the Wi-Fi or DHCP, before the internet.
- macOS:
ifconfig,netstat -rnfor the route,scutil --dnsfor DNS, andtraceroute.
Commands used
ippingcurltracepath
Each has a page in lore: lore ip opens it.
Related recipes
- check a certificateSee a site's TLS certificate, when it expires and who issued it, or the same for a .pem file.
- copy files to and from a serverCopy a file or a whole folder between this machine and another one over ssh.
- download a whole folder from a websiteFetch every file under a web folder, without climbing to the folders above it.
- find this machine's ip addressThis machine's address on the local network, and the one the internet sees.