Notes
The flat network
Start with what goes wrong. In a flat network every machine can reach every other: laptops, printers, servers and databases all on one segment. One phished laptop can scan the whole company and connect straight to the database server. Ransomware spreads to everything it can reach, which is everything. The blast radius of any single mistake is the entire organisation. Many of the worst ransomware incidents on record were this simple.
- one big network: laptops, printers, servers, databases
- any machine can connect to any other
- one phished laptop can scan and attack everything
- ransomware spreads to every machine it can reach
- blast radius = the company
Zones
The answer is to group systems into zones by their job and by how sensitive they are. Traffic inside a zone flows freely. Traffic between zones must cross a firewall with explicit rules and default deny. The guiding principle is that a less trusted zone may not open connections into a more trusted one, except through a few named doors. You are applying least privilege from Part zero, to network paths instead of people.
- a zone: systems with a similar job and sensitivity
- traffic inside a zone flows
- traffic between zones crosses a firewall, with rules
- default deny between zones
- less trusted zones may not start connections into more trusted ones
The DMZ
The oldest zone design is the DMZ, the demilitarised zone. It holds the systems the internet is allowed to touch: web servers, reverse proxies, mail gateways. The internet may reach the DMZ. The DMZ may reach inward only on a few specific ports. The internet may never reach the inside directly. You design it assuming a DMZ server will be compromised one day, so that when it is, the attacker still faces another wall.
- holds public-facing systems: web servers, reverse proxies, mail gateways
- internet may reach the DMZ
- the DMZ may reach inside only on specific ports
- internet may never reach inside directly
- assume the DMZ will be compromised one day
Three tiers
The standard application layout extends that idea into three tiers. The web tier takes requests, the application tier runs the logic, and the data tier holds the database. The rules are short: web may talk to app on one port, app may talk to data on one port, and nothing may skip a tier. The database has no path to or from the internet at all. An attacker who takes the web tier still has two walls in front of the data.
- web tier: takes requests
- app tier: runs the logic
- data tier: holds the database
- rules: web to app on one port; app to data on one port; nothing skips a tier
- the database has no route to or from the internet
- compromise the web tier and two walls still stand
More zones
A few more zones are worth having. Staff laptops in one. Guest Wi-Fi with internet access only. Printers, cameras and other devices isolated, because they are rarely patched. A management zone that is the only place administrative access may come from. Production separated from staging and development, which would have stopped the attack in Part zero. Backups reachable by almost nothing. And payment systems in a tiny zone of their own.
- office: staff laptops
- guest Wi-Fi: internet only IoT and printers: isolated
- management: the only place admin access may come from production apart from staging and development
- backups: reachable by almost nothing
- payment systems: a tiny zone (shrinks PCI scope)
How it is built
How is it built? A subnet is a range of addresses, and a VLAN is a separate virtual network carried on shared switches. Together they draw the lines between zones. But a line is not a wall. If the router between two VLANs passes everything, you have segmentation on a diagram and none in reality. The wall is the firewall or access list between them. Switch settings matter too, since a misconfigured port can let a device hop between VLANs.
- subnet: a range of addresses, e.g. 10.0.2.0/24
- VLAN: a separate virtual network on shared switches
- a VLAN alone is a line, not a wall
- the wall is the firewall or ACL between them
- VLAN hopping exists: disable auto-trunking on ports
Microsegmentation
Zones still allow neighbours inside one zone to attack each other. Microsegmentation shrinks the zone until it holds a single workload, with a policy for each: the orders service may call the payments service on one port, and nothing else may. It is built with cloud security groups, Kubernetes network policies and host firewalls rather than hardware. This is zero trust at the network layer: no connection is allowed just because of where it comes from.
- zones still let neighbours attack each other
- microsegmentation: a policy per workload
- "orders may call payments on 443; nothing else may"
- cloud security groups, Kubernetes network policies, host firewalls
- this is zero trust at the network layer
In the cloud
In the cloud the same design uses different names. A VPC is your private network. Public subnets hold only load balancers. Applications and databases live in private subnets with no public addresses. Security groups do the microsegmentation, one per workload. And the strongest wall of all is not a network control: it is putting production and non-production in separate cloud accounts, so no network path or shared permission connects them.
- VPC or VNet: your private network
- public subnet: load balancers only private subnets: apps and databases, no public IPs
- security groups: the microsegmentation
- separate accounts for prod and non-prod: the strongest wall
Prove it
Finally, prove it. From a machine in each zone, scan the others, and confirm that only the allowed ports answer. Keep the rules as code and review changes. Log and alert on denied traffic between zones, because a laptop trying to reach a database is either a mistake or an attacker. And look for the classic holes: a rule allowing everything between two zones, a server with a leg in both, and admin accounts shared across every zone.
- from each zone, scan the others with Nmap: only the allowed ports answer?
- keep rules as code, reviewed
- log and alert on denied cross-zone traffic
- watch for the classic holes: "any-any" between zones, dual-homed servers, shared admin accounts
Common mistakes
Mistakes. A single flat network. VLANs with no filtering between them, which is decoration. Production and staging sharing a network or an account. Databases with public addresses. Administrative access allowed from any laptop instead of a management zone. Rules between zones that only ever grow. And never testing from the inside, so the first person to discover the gaps is an attacker.
- one flat network
- VLANs with no filtering between them
- prod and staging together
- databases with public IPs
- admin from any laptop
- rules that grow, never shrink
- never testing from inside
Say it like this
In the interview: I divide the network into zones by function and sensitivity, with default deny between them. Public-facing systems go in a DMZ, application and data tiers may only talk to the adjacent tier, administration comes only from a management zone, and production is separated from non-production, ideally in different cloud accounts. On top I microsegment individual workloads with security groups or network policies, and I verify it with scans from each zone.
- "Zones by function and sensitivity, default deny
- between them: a DMZ for public
- systems, app and data tiers
- that only talk to the next
- tier, a management zone, prod apart from non-prod.
- Then microsegment workloads, and test with scans."