Stage 2 · Lesson 6 of 8
Firewalls and exposing only what you need
A decides which network traffic may reach a machine. On a single Ubuntu server, ufw is the friendly tool for this. Deny all incoming traffic by default, then allow only ports 22, 80 and 443.
Rules can also match where traffic comes from, so SSH can be limited to your own . The same thinking carries into cloud and . Start with nothing allowed, and open each port for a reason.
Databases, caches and admin panels should never face the internet. They belong on a private network, reachable only from the app.
Common traplocking yourself out: always allow SSH before turning on a default-deny rule on a remote server, and keep a console session open while you test.
A question to check yourself, an AI practice session and 1 cheat sheet entry come with the full roadmap. Unlock
Resources for this stage
Start with
- VideoFreeComputer Networking: A Top-Down Approach (Video Lectures)
Jim Kurose and Keith Ross · Intermediate
Free lectures from the textbook authors; chapters 1 to 4 cover what DevOps needs
Practise
Keep handy
Also worth your time
- Load Balancer vs. Reverse Proxy vs. API Gateway: Demystifying Web Architectures (opens in a new tab)Read
Separates three components people often mix up, and what each one is for