DevOps and cloud

Stage 2 · Lesson 6 of 8

Firewalls and exposing only what you need

Networking for engineers

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

Practise

  • Answer its networking questions before reading the answers to find your gaps

Keep handy

  • Official guide to serving files and proxying to an app, the base of every config

  • The HTTP guides on headers, caching and status codes, for debugging proxies

Also worth your time

Mark this stage as not done?