Interview Prep/Linux/Networking, DNS and firewalls

A host can reach servers in its own subnet but nothing beyond: `connect: Network is unreachable`.

BeginnerTroubleshootingNetworking, DNS and firewalls
Answer

Likely causes → No default route (missing gateway, DHCP failure, misconfigured static config).

Diagnose →

ip route
ip -4 addr
nmcli dev show eth0 | grep -i gateway

Fix → Add it now: sudo ip route add default via 10.0.1.1 dev eth0, then persist in NetworkManager/netplan (ipv4.gateway).

Prevent → Validate network config with netplan try or a test after changes.

All Linux questions Roadmap: Linux

More on Networking, DNS and firewalls