Network security
TLS, firewalls, segmentation, VPNs, and reading a packet capture. Trace how a request crosses trust boundaries and where you would inspect it.
The mental model
Network security is about controlling where data can flow and who can read it while it flows. Everything reduces to two properties applied at every hop a packet takes: reachability (can A even talk to B?) and confidentiality/integrity (if A talks to B, can anyone in the middle read or alter it?). Firewalls and segmentation govern reachability; TLS governs confidentiality and integrity. The whole discipline is deciding, for each pair of endpoints, whether they may connect and whether that connection is protected.
The analogy that sticks: a corporate building. The firewall is the security desk deciding who may enter which floors — deny by default, allow by exception. Segmentation is that the finance floor is behind its own locked door even for people already inside the building, so a stranger who tailgates the lobby cannot wander into the vault. TLS is a sealed, tamper-evident envelope for anything carried between floors, so a courier in the corridor cannot read or swap the contents. A VPN is a private, sealed hallway connecting two buildings across a public street. And reading a packet capture is watching the CCTV of the corridors to see who actually walked where — the ground truth when the access logs and reality disagree.
Why this matters and why interviewers probe it: most engineers reason about an application as if the network were a trusted wire. It is not. The senior instinct is to trace a request across its trust boundaries — browser to load balancer to app to database to third-party — and, at each boundary, ask "is this connection authenticated, encrypted, and necessary?" The modern doctrine, zero trust, takes this to its conclusion: the network is never trusted just because it is "internal"; every hop authenticates and encrypts, because the flat internal network is exactly where an attacker who gets one foothold moves laterally to everything else.
- Deep dive
- Internal architecture
- Real-world use cases
- Best practices
- Common mistakes
- Performance
- Security
- Production troubleshooting
- Advantages & disadvantages
- Alternatives
- Interview expectations
- Interview questions
- Facts to remember
- Cheat sheet
- Quick revision