Network security

Network Segmentation Firewall: How to Segment and Secure a Network

A flat network lets one compromised device reach everything. Segmentation plus firewall rules turns that open floor into locked rooms.

Cysoro Security TeamPublished · 8 min read
NETWORK SECURITYNetworksegmentationZones, firewalls, zero trust.USERSSERVERSGUESTSDMZ
Quick answer

Network segmentation with a firewall means dividing a network into smaller zones, such as users, servers, guests and management, and placing firewall rules between them so only approved traffic can cross. A firewall enforces the boundaries: by default it denies traffic between zones, and it allows only the specific ports and services each zone needs. This limits lateral movement, so a compromised device cannot easily reach sensitive systems.

Key takeaways

  • Segmentation divides a network into zones; the firewall enforces which traffic may cross between them.
  • VLANs alone do not segment a network — traffic between VLANs needs firewall rules or access lists to be controlled.
  • Start with a few zones, deny by default, allow only named flows, and log and test every rule.

Most small networks are flat: every laptop, printer, server and guest phone sits on the same network and can reach everything else. That is convenient until one device is compromised. Then the attacker can move sideways to file shares, backups and servers without hitting a single barrier.

What is network segmentation with a firewall?

Network segmentation with a firewall is the practice of dividing a network into smaller zones and using firewall rules to control traffic between them. Each zone holds systems with similar trust and risk, and the firewall decides which flows may cross from one zone to another.

A typical design has an outside zone, a DMZ for internet-facing services, an internal user zone, a server zone and a management zone. Rules say which zone may talk to which, on which ports. All other traffic is denied by default.

NIST describes this approach in SP 800-215, its guide to a secure enterprise network landscape, which covers network configurations, firewalls and frameworks such as zero trust network access and microsegmentation, as set out on the NIST SP 800-215 page.

Why does network segmentation matter?

Segmentation matters because it limits lateral movement. Lateral movement is the phase where an attacker who has compromised one device pivots to more valuable targets inside the network. If a web server is compromised but cannot reach the database directly, the attacker's path stops there.

It also protects sensitive data and helps with compliance. Payment systems, health records and backups can sit in their own zones with stricter rules, while guest Wi-Fi and IoT devices sit in zones that cannot reach them at all.

Segmentation does not replace patching, identity security or endpoint protection. It is one layer in defense in depth. A segmented network with unpatched servers is still vulnerable, but an attacker will find it much harder to move around inside it.

Flat network vs segmented networkFlat networkOne compromised laptopcan reach servers,backups and printersNo barriers insideSegmented networkUsers, servers, guestsand managementin separate zonesFirewall checks every crossingSame devices, same firewall — different layout, very different risk.
Flat network vs segmented network. Illustration by Cysoro.

What is the difference between segmentation and microsegmentation?

Segmentation divides a network into larger zones, such as users, servers and guests. Microsegmentation narrows the boundary to a single workload or a small group of related resources, with a policy enforcement point in front of each one.

NIST SP 800-207 describes microsegmentation as placing individual resources or small groups on a unique network segment protected by a gateway security component, which can be an intelligent switch, a next-generation firewall or a host-based agent. Access is decided per request, by policy.

For most small and mid-size networks, zone segmentation is the right starting point. Microsegmentation is the next step when you have many servers, virtual machines or containers and you need per-workload control. Do not try to microsegment everything on day one; start with zones and tighten from there.

ApproachBoundaryEnforced byBest forComplexity
Flat networkNonePerimeter firewall onlyVery small, low-risk networksLow
Zone segmentationZone or VLANFirewall between zonesMost small and mid-size networksMedium
MicrosegmentationSingle workloadNext-generation firewall or host agentData centers, regulated workloadsHigh
Identity-based policyIdentity and workloadPolicy engine and enforcement pointZero-trust architecturesHigh

The CISA Zero Trust Maturity Model version 2.0, published in April 2023, places network segmentation in its Networks pillar and describes it progressing from large perimeter segmentation at the Traditional stage to fully distributed micro-perimeters at the Optimal stage, as described in the CISA Zero Trust Maturity Model.

How do VLANs and firewalls work together?

VLANs and firewalls do different jobs. A VLAN groups devices into a logical network, even if they share the same physical switch. A firewall controls traffic between those groups. You need both for segmentation to work.

A common mistake is to create VLANs and assume the network is segmented. NIST SP 800-125B warns that treating segmentation as the same thing as a VLAN is inaccurate: traffic between VLANs is only controlled if a firewall or access list on the routed path says so.

The practical pattern is simple. Put each zone on its own VLAN or subnet, route traffic between VLANs through a firewall, and write rules that allow only named flows. Anything not explicitly allowed is denied. Log denied traffic so you can see what is trying to cross.

For a small office, three or four zones are enough to start: users, servers, guests and management. Add an IoT zone if you have cameras, printers or smart devices, because those devices are often hard to patch and should not be able to reach servers.

How do you design firewall zones?

Start by mapping what you have. List every device, workload and data flow: who talks to whom, on which ports, and why. You cannot write good firewall rules until you know which flows are legitimate.

Next, group systems by function and sensitivity, not just by department. Finance, production, guest Wi-Fi and management are different zones because they have different risks, even if the same people use them. Keep internet-facing services in a DMZ, so a compromised web server does not sit on the same network as your database.

Then write the rules. Allow the web tier to talk to the app tier on one port, and the app tier to talk to the database on one port. Block direct web-to-database traffic. Allow management access only from the management zone, on the ports admins actually use. Our guide to securing your Wi-Fi covers the guest-network side of this design in more detail.

  • Outside: the internet, untrusted by default.
  • DMZ: internet-facing services, such as a web server.
  • Users: laptops and desktops, with internet access but no server access.
  • Servers: internal apps, file shares and databases.
  • Management: admin workstations, switches and backup systems.
  • Guests and IoT: internet only, no access to internal zones.

What firewall rules should you write between segments?

Write rules that are specific, not broad. A good rule names the source zone, the destination zone, the port and the protocol. A bad rule allows all traffic from one zone to another, which defeats the point of segmentation.

Use deny by default. Start with a rule that blocks all traffic between zones, then add explicit allow rules for the flows you mapped earlier. Each allow rule should have a business reason, an owner and a review date. If no one can explain why a flow exists, it should not be allowed.

Make permit rules both IP and port specific, and restrict them to the addresses that need them. That is the approach NIST recommends for operational technology networks in SP 800-82, and it applies just as well to ordinary office networks. Avoid rules that allow a whole subnet to reach a whole subnet on all ports.

Example: firewall rules for a three-tier appWeb tier to app tier — port 8080 — ALLOWApp tier to database tier — port 5432 — ALLOWWeb tier to database tier — any port — DENYUsers to database tier — any port — DENYManagement to all tiers — SSH port 22 — ALLOW from management zone only
Example firewall rules for a three-tier app. Illustration by Cysoro.

Log and review. Turn on logging for denied traffic and for the most sensitive allow rules. Review the logs weekly at first, then monthly. If a rule is never used, remove it. If a rule is hit constantly by unexpected traffic, investigate before you widen it.

How do you implement network segmentation step by step?

Segmentation is a project, not a single change. The steps below work for a small office or a mid-size network, and they keep the network running while you tighten it.

  1. Map assets and flows. Inventory devices, servers and cloud services, and record which systems talk to each other.
  2. Define zones. Start with users, servers, guests and management, plus a DMZ if you host services.
  3. Put zones on VLANs. Assign each zone its own VLAN or subnet, and route inter-zone traffic through the firewall.
  4. Write deny-by-default rules. Allow only the named flows from your map, one rule at a time.
  5. Test from each zone. Try to reach systems that should be blocked, and confirm they are blocked.
  6. Monitor and tighten. Watch firewall logs, remove unused rules, and add zones as you learn.
  7. Document and review. Keep a diagram and a rule list, and review both every quarter.

Do the work in stages. Start with the easiest win, which is usually guest Wi-Fi isolation, then move to the server zone, then to management. Each stage should be tested before you move to the next, so a mistake does not take down the whole network.

For a wider starting point, our small business cybersecurity checklist covers segmentation alongside backups, updates and device security.

What are common network segmentation mistakes?

The most common mistake is creating VLANs without firewall rules, which leaves the network flat in practice. The second is writing rules that are too broad, such as allowing all traffic between two zones, which removes the barrier you just built.

Another mistake is forgetting east-west traffic. Many teams secure north-south traffic, meaning traffic in and out of the network, but leave east-west traffic, meaning traffic between internal systems, wide open. Attackers live in east-west traffic, so that is where segmentation matters most.

Do not forget cloud and remote access. If your servers are in the cloud, or your staff work from home, segmentation must cover those paths too. A VPN that drops remote users straight into the server zone undoes your work. Route remote access through the firewall, with the same zone rules as local users.

Test after every changeA single new firewall rule can reopen a path you closed. Test from each zone after every change, and keep a backup of the firewall configuration before you edit it.

Finally, do not set and forget. Networks change, new systems appear, and old rules become stale. Review your zones and rules every quarter, and remove anything you no longer need. Our spear phishing guide explains how attackers get the first foothold that segmentation is designed to contain.

The bottom line

Network segmentation with a firewall turns a flat network into a set of locked rooms. Start with a few zones, route traffic between them through the firewall, deny by default, and allow only the flows you can name and justify. Test, log and review, and tighten over time.

You do not need an enterprise budget to start. Separate guest Wi-Fi, a server zone and a management zone, with firewall rules between them, is a strong first step. Check your public exposure with our free what-is-my-IP tool and keep building from there.

Frequently asked questions

What is network segmentation?

Network segmentation is dividing a network into smaller sub-networks or zones, so that traffic between zones can be monitored and controlled. It limits how far an attacker can move after compromising one device, and it protects sensitive systems from ordinary user traffic.

What is the difference between segmentation and microsegmentation?

Segmentation usually divides a network into larger zones, such as users, servers and guests. Microsegmentation narrows the boundary to a single workload or a small group, with policy enforced per workload, often by a host firewall or a next-generation firewall.

Do VLANs count as network segmentation?

VLANs are a useful building block, but they are not segmentation on their own. Traffic between VLANs is only controlled if a firewall or access list on the routed path says so. Without that enforcement, devices on different VLANs can still reach each other.

What firewall rules should I use between segments?

Start with deny by default, then allow only the specific flows each zone needs, named by source, destination, port and protocol. For example, allow the web tier to talk to the app tier on one port, and the app tier to talk to the database on one port, and block everything else.

Is network segmentation only for large companies?

No. Small networks benefit too, and the simplest version is cheap: separate guest Wi-Fi, a management network, and a server zone, with firewall rules between them. Even three zones are far safer than one flat network.

How does network segmentation help with ransomware?

Ransomware spreads by moving laterally from the first compromised device to file shares, backups and servers. Segmentation with deny-by-default firewall rules blocks many of those paths, so the damage stays in one zone instead of spreading across the whole network.

How do I test network segmentation?

Test from inside each zone. Try to reach systems in other zones on ports that should be blocked, and confirm they are blocked. Check the firewall logs, test after every change, and repeat the test regularly, because a single new rule can reopen a path.

Sources

  1. NIST — Guide to a Secure Enterprise Network Landscape (SP 800-215)
  2. NIST — Guide to a Secure Enterprise Network Landscape (SP 800-215 PDF)
  3. CISA — Zero Trust Maturity Model
  4. Tigera — Network Segmentation with NIST: 6 Takeaways from NIST Guidelines
Written & fact-checked byCysoro Security Team

The engineers and analysts who build Cysoro's domain scanner, email-authentication checks and free security tools. We test what we write about every day — SPF, DKIM, DMARC, certificates, look-alike domains and phishing — and check each guide against the relevant standards, government guidance and vendor documentation.

  • Email authentication
  • Phishing & BEC
  • Domain & DNS security
  • Small-business security

Checked against NIST SP 800-215, NIST SP 800-207 and the CISA Zero Trust Maturity Model version 2.0.

How we write and fact-check →

Free tools for this topic

No account needed.

See where your domain stands

Free for up to 3 domains. No card, no installs.

Start free