Network segmentation and zero trust

Stop attackers from roaming, stop trusting the network

Split a flat network into zones, control what crosses between them, and see how zero trust goes one step further by checking every request.

intermediate level, 16 minutes, 17 slides.

Open the interactive deck

Network segmentation and zero trust

Welcome. Split a flat network into zones, control what crosses between them, and see how zero trust goes one step further by checking every request. This talk runs about 16 minutes.

The problem: flat networks

On a flat network, one infected laptop can talk to every server. Segmentation shrinks what one mistake can reach.

Picture an office with no internal doors. Once you are in the building, you can walk anywhere. Most networks started that way, and we call them flat. Read the sentence on the screen. On a flat network, one infected laptop can talk to every server. Segmentation shrinks what one mistake can reach. Think of a ship with sealed compartments. A leak in one room does not sink the whole vessel. Our job in this deck is to add the doors, decide who holds the keys, and then check that the doors really lock. Then we go one step further, to zero trust.

Flat versus segmented

Green arrows are allowed. Red dashed arrows are blocked.

    Look at the picture. There are three zones. Staff laptops, web servers, and a database. The caption tells you how to read it. Green arrows are allowed. Red dashed arrows are blocked. Follow the green ones. Staff can reach the web servers over HTTPS only. Web servers can reach the database on one port only. Now find the red dashed arrow. Staff laptops cannot reach the database directly. So if a laptop is infected, the database is not one hop away. The attacker would have to get through the web servers first, and every extra step is a chance to notice.

    Why it pays off

    • Smaller blast radius when something is compromised
    • Easier to watch: few allowed paths, so odd traffic stands out
    • Easier to explain to auditors
    • Fewer accidental exposures of old systems

    Segmentation pays off in four ways, and you can read them down the list. A smaller blast radius when something is compromised. Easier to watch, because with few allowed paths, odd traffic stands out. Easier to explain to auditors. And fewer accidental exposures of old systems. Think of a quiet street. If only a few cars normally drive by, you notice the stranger right away. On a busy highway, you would not. So segmentation helps you twice. It limits damage, and it makes monitoring simpler because there are fewer normal paths to learn.

    How zones are built

    ToolWhat it doesGood for
    VLANSplits one switch into separate networksOffices, labs
    Subnet plus firewallControls traffic between networksAnywhere
    Host firewallRules on each machineServers, laptops
    Cloud security groupRules attached to a workloadCloud

    A VLAN alone is a label, not a wall. Traffic between VLANs must still pass a firewall that you control.

    This table shows the tools that build zones. Read it across. A VLAN splits one switch into separate networks. A subnet plus firewall controls traffic between networks. A host firewall puts rules on each machine. A cloud security group attaches rules to a workload in the cloud. Now read the warning. A VLAN alone is a label, not a wall. A VLAN is like colored name tags at a party. It only becomes a wall when someone checks the tags at the door. That check is the firewall between zones, and it must be one that you control.

    Plan the zones first

    1. List what you have. Devices, servers, who uses them.
    2. Group by risk. User devices, servers, guests, cameras, admin.
    3. Write the allowed paths. Default deny, then add only what is needed.
    4. Test and log. Prove the blocked paths are blocked.

    Do the thinking on paper before touching any switch. Read the four steps. List what you have, meaning devices, servers and who uses them. Group by risk, such as user devices, servers, guests, cameras and admin. Write the allowed paths, using default deny, and add only what is needed. Default deny just means everything is blocked unless a rule says otherwise. Then test and log, to prove the blocked paths are blocked. Most mistakes come from not knowing which systems talk to which. Start from default deny and add only what you can justify, like an invitation list for a party.

    A rule written down

    Policy as a table. Addresses use the documentation range 192.0.2.0/24.

    ALLOW  users 192.0.2.0/26   -> web 192.0.2.64/26   tcp/443
    ALLOW  web   192.0.2.64/26  -> db  192.0.2.128/26  tcp/5432
    DENY   everything else (log it)

    Three lines, and the database is no longer reachable from laptops.

    Here is a policy written down as a table. Read the three lines slowly. The first line allows users to reach the web zone on port four four three. The second allows the web zone to reach the database zone on its database port. The third denies everything else, and logs it. The addresses come from a range reserved for documentation, so they are safe examples. This is the entire policy of the diagram a few slides back. It is short enough to read in a review. When policies get long, bugs hide in them, which is why labs on finding shadowed rules matter.

    Common ways segmentation fails

    • Allow any to any rules added to fix an outage and never removed
    • Shadowed rules: an earlier rule hides a later one
    • Management network reachable from user networks
    • Misconfigured trunk ports allow VLAN hopping
    • Nobody checks effective reachability against the plan

    Segmentation can fail quietly, so read these five failure patterns. Allow any to any rules, added to fix an outage and never removed. Shadowed rules, where an earlier rule hides a later one. A management network that user networks can reach. Misconfigured trunk ports that allow VLAN hopping. And nobody checking real reachability against the plan. Real firewalls collect old rules like a garage collects boxes. Nobody wants to throw one away in case it matters. So plan time to test what traffic is actually possible, and compare it to what you intended.

    Zero trust: the next step

    From NIST SP 800-207: A device's network location or ownership does not grant implicit trust. Authentication and authorization of users and devices happen before a session with a resource begins.

    Zero trust protects individual resources, not network segments.

    Now the next step, zero trust. Read the quote from NIST. A device's network location or ownership does not grant implicit trust. Authentication and authorization of users and devices happen before a session with a resource begins. In plain words, being inside the network no longer counts as proof. Segmentation asks where you are. Zero trust says where you are is not enough. Every request must prove who is asking and whether the device is healthy. Read the line under the quote. Zero trust protects individual resources, not network segments. Think of a hotel key card that opens only your room, not the whole floor.

    Where the idea came from

    Google described moving its corporate applications onto the internet and dropping its privileged internal network, an approach called BeyondCorp. The paper's reasoning: once an attacker breaks through a perimeter firewall, they can move fairly freely on the inside.

    Same lesson as segmentation, applied to every single request.

    This is the origin story. Google described moving its corporate applications onto the internet and dropping its privileged internal network, an approach called BeyondCorp. Read the reasoning on the slide. Once an attacker breaks through a perimeter firewall, they can move fairly freely on the inside. Think of a castle where, once you cross the wall, every room is unlocked. Now read the callout. It is the same lesson as segmentation, applied to every single request. The paper is a short, readable starting point if you want to go further, and the source is listed on this slide.

    Perimeter versus zero trust

    Perimeter model

    • Inside the network means trusted
    • One strong firewall
    • VPN gives broad access
    • Trust checked once, at login

    Zero trust model

    • Location grants nothing
    • Check user and device each time
    • Access to one app, not the network
    • Log every decision

    Here are the two models side by side. Read down the left column, then down the right. The perimeter model says inside the network means trusted. It relies on one strong firewall. A VPN gives broad access. Trust is checked once, at login. The zero trust model says location grants nothing. It checks the user and device each time. Access goes to one app, not the whole network. And every decision is logged. Notice that the right column is not a product you buy. It is a way of deciding who gets access to what. You can start applying it with the tools you already have.

    A zero trust request

    A decision point sits in front of every resource.

    • User and device: ask for access
    • Policy check: identity, device health, context
    • Decision: allow, deny or step up
    • One resource: only that app
    • Log: record it

    Follow the arrows across. Five steps. The user and device ask for access. A policy check looks at identity, device health and context. A decision is made, allow, deny, or step up. Step up just means asking for stronger proof. Then the user reaches one resource, only that app. And finally, the decision is logged. The caption says a decision point sits in front of every resource. The important step is the policy check in the middle. It uses who you are and how healthy your device is, not which network cable you are plugged into.

    Control what leaves, too

    Most designs only block inbound traffic. Attackers who get in still need to call home or move data out.

    • Default-deny outbound from servers
    • Allow only the destinations they really use
    • Proxy and log what is allowed

    Try it: Control outbound traffic with a Squid egress proxy

    Most designs only block inbound traffic. Read the first sentence. Attackers who get in still need to call home or move data out. That is why egress, meaning outbound traffic, matters. Read the three bullets. Default deny outbound from servers. Allow only the destinations they really use. Proxy and log what is allowed. Egress control is the forgotten half. A database server rarely needs to browse the web. Say so in the rules, and you will notice when it tries. There is a hands-on lab linked here with an outbound proxy. Give it a try after the deck.

    Check yourself

    Check yourself: What does a VLAN do by itself?

    Answer: Separates networks logically, but needs a firewall to enforce rules. VLANs separate broadcast domains. Something at the boundary must still decide what may cross.

    Check yourself: Zero trust says trust should depend on:

    Answer: Identity, device state and context for each request. Per NIST SP 800-207, network location or ownership does not grant implicit trust.

    Two quick checks before the labs. Read the first question. What does a VLAN do by itself? Remember the name tags at the party. Then the second. Zero trust says trust should depend on what? Think of the hotel key card. Pick an answer on each, then tap it to see the reason. The explanation for the second one points back to the NIST wording we saw earlier. If either one was tricky, go back to the slide about how zones are built, or the zero trust quote, and read it again. There is no rush, and no score.

    Take-aways

    • Zones limit blast radius
    • Default deny, add allowed paths deliberately
    • A VLAN needs an enforcing firewall
    • Test reachability against your plan
    • Zero trust checks each request, not just the location

    Let us wrap up with the take-aways. Read all five bullets. Zones limit blast radius. Default deny, and add allowed paths deliberately. A VLAN needs an enforcing firewall. Test reachability against your plan. And zero trust checks each request, not just the location. Think back to the ship with sealed compartments, and the hotel key card that opens one room. Those two pictures carry most of the deck. Next deck is about identity. If the network stops being the boundary, identity has to become the boundary. So keep that thought, and I will see you there.

    Practise this

    Slides only get you so far. Pick one of these hands-on labs and do it today while it is fresh. Every lab is free.

    Sources

    • CIS Critical Security Controls v8.1
    • NIST SP 800-207, Zero Trust Architecture (August 2020)
    • BeyondCorp: A New Approach to Enterprise Security (Ward and Beyer, ;login: 2014)

    Every claim in this deck came from these pages, fetched and checked for this release. Read the originals.

    Hands-on labs for this deck

    Open the interactive deck or see all slide decks.

    Related