Hands-on guide series
Linux Networking from the Terminal: A Hands-On Guide
A nine-part, hands-on guide to networking from the Linux command line: interfaces and ip, ports and ss, DNS, curl, scp and rsync, ufw, ping and traceroute, SSH tunnels, and diagnosing a slow connection. Every command run on a live Ubuntu server.
What you will build
Security is layers, not a switch. Each part closes a different category of attack, from the automated sweep that finds a brand-new server, to the day one gets in anyway. Read them in order, or jump to what you need.
- 1
Interfaces and the ip CommandUse the linux ip command on an Ubuntu 24.04 server to see an interface, its IP address, and the route your traffic takes to leave the machine.6 min - 2
Ports and Sockets With ssUse the linux ss command to see which ports are open on a server, which process owns each one, and whether it listens to the world or just localhost.6 min - 3
DNS ResolutionUnderstand linux dns resolution: how a name becomes an IP address on Ubuntu, how to query a name with resolvectl, and how to read where the answer came from.6 min - 4
curl and wgetUse curl and wget on a server to read response headers and status codes, download files, and know when to reach for one tool over the other.7 min - 5
ssh, scp and rsyncLearn scp and rsync: scp for a one-off copy, rsync for a resumable sync that only sends what changed, both over the SSH connection you already trust.7 min - 6
Firewall Basics With ufwRun the ufw firewall Ubuntu ships with: control which ports the outside can reach, read the rule status on a server, and enable default deny safely.7 min - 7
Testing ConnectivityUse ping and traceroute on a server to test whether a host answers and to see the path your packets take, so you can find where a connection breaks.7 min - 8
SSH Tunnels and Port ForwardingUse ssh tunnel port forwarding to reach a service bound only to the server, forwarding a local port through your connection without exposing it.7 min - 9
Diagnosing a Slow ConnectionLinux network troubleshooting for a slow service: test the layers in order, network, then DNS, then the application, and stop at the first that fails.6 min