Linux Networking
Essential networking skills for DevOps and system administration. If servers are the buildings in your infrastructure, networking is the road system connecting them. Every deployment, every API call, every SSH session travels over these roads. Understanding them is the difference between debugging a connectivity issue in five minutes versus five hours.Network Configuration
Viewing Network Interfaces
Testing Connectivity
When something is not working, you troubleshoot layer by layer. Start simple and work up.Viewing Open Ports and Connections
SSH - Secure Shell
SSH is how you access remote servers. It encrypts everything — passwords, commands, file transfers. In production, SSH is your primary interface to every server you manage.Connecting
SSH Key Authentication
Keys are both more secure and more convenient than passwords. The private key stays on your machine; the public key goes on the server.SSH Config File
Instead of typing long SSH commands, define shortcuts in~/.ssh/config:
Copying Files
SSH Tunneling
SSH tunnels let you securely access services on remote networks as if they were local. Think of it as building a secret underground passage between two buildings — traffic flows through the encrypted tunnel, invisible to anyone watching the surface. This is invaluable for reaching databases, admin panels, or internal services that are not exposed to the internet. Instead of opening ports on your firewall (risky), you tunnel through SSH (secure).Firewall Basics
A firewall controls which network traffic is allowed in and out of your server. On a fresh server, the first thing you do (after setting up SSH keys) is configure the firewall.UFW (Uncomplicated Firewall)
UFW is the beginner-friendly frontend for iptables on Ubuntu/Debian systems.iptables (Advanced)
iptables is the underlying firewall system. UFW generates iptables rules for you, but knowing iptables helps when you need fine-grained control or are debugging complex networking.DNS Configuration
Understanding DNS configuration helps when servers cannot resolve hostnames.Key Takeaways
- Use
ip addrandip route(not the deprecatedifconfig) for network info - Troubleshoot connectivity in layers: ping, port check, DNS, traceroute
- SSH key authentication is both more secure and more convenient than passwords
- Use
~/.ssh/configto define connection shortcuts for servers you access frequently - SSH tunnels give you secure access to remote services without exposing them publicly
- Always allow SSH before enabling a firewall — or you will lock yourself out
ss -tulpnis the go-to command for “what is listening on which port”
Next: Linux Shell Scripting →