Microsegmentation Policy: Limiting East-West Traffic

How do you limit traffic between servers? Flow discovery, label-based policy, host/hypervisor/network methods; trying Windows Defender Firewall rules with a pilot group and enforcing in phases.
Technical summary
Technology
Windows Defender Firewall, PowerShell NetSecurity, WFP auditing, distributed firewall, Zero Trust
Topic
Limiting traffic between servers with an allowlist based on application dependencies
Level
Intermediate–advanced
Prerequisites
  • Active Directory and Group Policy administration
  • An inventory of server roles and application components
  • TCP/UDP port and service information
In this article7 sections

Once an attacker compromises a server, they never pass the perimeter firewall again. They spread to other servers in the same data center, often in the same subnet, over SMB, RDP, WinRM and database ports; this east-west traffic is the path the device inspecting north-south traffic never sees. Microsegmentation limits this internal traffic at the workload level to the flows the application really needs. Below we cover step by step building the policy model, choosing the enforcement method, and trying the rules with a pilot group before enforcing them in phases.

The difference between microsegmentation and VLAN segmentation

VLAN-based segmentation divides servers into zones and passes traffic between zones through a firewall or L3 ACL. Traffic between two servers in the same VLAN, however, passes through no control point. This is exactly the limit we described in the difference between VLANs and real network security article. Same VLAN, same fate.

Criterion VLAN/subnet segmentation Microsegmentation
Unit of control Subnet or zone Single workload or role
Policy key IP range Label, role, application
Intra-zone traffic Not inspected Inspected
Impact of changes May require readdressing A rule update is enough
Prerequisite Network design Application dependency information

In enterprise cybersecurity projects, the real challenge of microsegmentation isn’t technical; it’s missing knowledge. In most organizations, which server connects to whom, on which port and why isn’t written down. The application owner says “our application only goes to the database”, and then it turns out a report job running at night writes to the file server. That’s why the work starts not with writing rules but with discovery.

Application dependency map and flow discovery

The output of discovery is a flow inventory made up of lines of “source role – destination role – protocol/port – justification” for each application. The data sources complement each other:

  • Connection observation on the host: the firewall log or Windows Filtering Platform auditing on Windows (event 5156 for an allowed connection, 5157 for a blocked one), ss -tunap and conntrack records on Linux.
  • Network flow data: NetFlow/IPFIX or the hypervisor’s flow visibility. It gives the broad picture without touching the host.
  • Application documentation and owners: jobs that run yearly or monthly (the closing report, the year-end backup) may not fall into the observation window. You only find these by asking the owner.
# Windows: enable WFP connection auditing (generates high event volume; use it for a limited time)
auditpol /set /subcategory:"Filtering Platform Connection" /success:enable /failure:enable

# Alternative: per-profile firewall log
Set-NetFirewallProfile -Profile Domain -LogAllowed True -LogBlocked True `
  -LogMaxSizeKilobytes 32767 `
  -LogFileName "%SystemRoot%\System32\LogFiles\Firewall\pfirewall.log"

With WFP auditing on, the Security log fills quickly; turn auditing on for a limited time and increase the log size in advance. On Linux workloads, the same observation is done by collecting ss -tunap output periodically or by adding a log statement to nftables rules. Whatever the source, don’t turn raw data directly into rules. Group it at the role and application level first; only then can the inventory be read and approved.

The observation period should cover at least one business cycle, usually a month-end close. Strip ephemeral client ports from the raw connections and base things on the listening port and service on the destination side. Rules aren’t written on source ports.

A label-based policy model

Rules written on IP addresses break when a virtual machine is moved, scaled or rebuilt. In the label-based model, each workload is given labels across a few dimensions and rules are written between these labels:

  • Application: ERP, CRM, file services.
  • Role: web, application, database, management.
  • Environment: production, test, development.
  • Location (if needed): main data center, branch, cloud.

Example rule: “Workloads with Application=ERP and Role=Application can connect to workloads with Application=ERP and Role=Database over TCP 1433.” The same logic also expresses coarse but valuable rules such as “Environment=Test can’t connect to Environment=Production” in a single line. Shared infrastructure services (DNS, AD, NTP, backup, monitoring, patching) are defined in a separate “shared services” rule set so they aren’t rewritten for each application. This approach is the internal-network counterpart of the resource-focused access idea in NIST SP 800-207.

Keep the label schema small. Four dimensions are enough. If it isn’t clear who assigns labels and at which step a new server gets labeled, the model reverts to an IP list within a few months.

Enforcement methods: comparing host, hypervisor and network

Method Examples Strength Limitation
Host-based Windows Defender Firewall, nftables, agent-based commercial products The same model on physical, virtual and cloud workloads If admin rights are compromised, rules can be turned off
Hypervisor-based VMware NSX distributed firewall, Proxmox VE firewall Independent of the guest operating system; labels follow the virtual machine Doesn’t cover physical servers and different platforms
Network-based Zone firewall, L3 ACL, VRF Central, independent of the host Can’t see traffic within the same subnet; the rule count grows quickly

The common model is mixed: coarse zone boundaries on the network firewall, and the workload-level allowlist on the host or hypervisor. With the host-based method, distribute the rule set centrally via GPO or configuration management and disable local rule merging; otherwise a local administrator adds their own allow rule and your policy is punctured.

Example: server role rules with Windows Defender Firewall

Scenario: ERP application servers (10.20.10.0/27) connect to SQL Server on the ERP database server; management access to the database server is only from the management jump hosts (10.20.99.0/28). The rules are defined in the GPO applied to the database server; you can use the PowerShell equivalent below for testing.

# SQL Server: only from the ERP application tier
New-NetFirewallRule -DisplayName "ERP-DB SQL from ERP-APP" -Direction Inbound `
  -Protocol TCP -LocalPort 1433 -RemoteAddress 10.20.10.0/27 `
  -Action Allow -Profile Domain -Group "MS-ERP-DB"

# RDP and WinRM: only from the management jump hosts
New-NetFirewallRule -DisplayName "ERP-DB Mgmt from JumpHosts" -Direction Inbound `
  -Protocol TCP -LocalPort 3389,5985,5986 -RemoteAddress 10.20.99.0/28 `
  -Action Allow -Profile Domain -Group "MS-ERP-DB"

# Review the rule group and its address filters
Get-NetFirewallRule -Group "MS-ERP-DB" | Get-NetFirewallAddressFilter

The first points to check in the console:

  • If Windows’ built-in allow rules (file and printer sharing, remote management) are enabled, the narrow rules you write lose their meaning. Explicitly set the state of these groups in the applied GPO.
  • For services using dynamic RPC, the -LocalPort RPCEPMap (135) and -LocalPort RPC keywords are much narrower than opening the 49152–65535 range.
  • Domain controllers receive connections from clients for DNS (53), Kerberos (88), RPC (135 and dynamic), LDAP (389/636), SMB (445), Kerberos password change (464), Global Catalog (3268/3269) and time synchronization (UDP 123). Leave this role for last.
  • Don’t forget the outbound direction: the database server’s connections to the internet and to workstations are usually unnecessary. Only turn on a default outbound block after you’ve also discovered the outbound flows.

Details of the cmdlet parameters are in Microsoft’s New-NetFirewallRule documentation.

Phased enforcement and rollback plan

  1. Visibility: turn on allow and block logging, build the flow inventory and have the application owner approve it.
  2. Adding allow rules: publish the allowlist without changing the default behavior. Nothing breaks at this stage; the goal is to see that the rules match correctly.
  3. Shadow analysis: for a set period, report connections that don’t match any allow rule. These are either missing rules or truly unnecessary traffic.
  4. Enforcement: switch the default inbound behavior to “block” first for the test environment, then for low-criticality production applications, and last for core services. In Windows Defender Firewall, the domain profile’s default inbound behavior is already block; here, enforcement means turning off broad built-in allow rules and local rule merging via GPO.
  5. Operations: generate SIEM alerts for newly blocked flows; add a “rule request for new servers and new dependencies” step to change management.

Write the rollback plan before each wave. For rules distributed via GPO, the fastest way is to disable the relevant GPO link and run gpupdate /force; for hypervisor-based solutions, switching the rule set to monitoring mode. Who does the rollback, with which approval and in how many minutes should be clear in advance. You don’t look for decisions at midnight.

We explained how to use block logs for detection in the firewall log analysis guide. To shape the application inventory and label model organization-wide, network security and segmentation and Zero Trust security architecture work can be planned together.

Frequently asked questions

Is it mandatory to buy a separate product for microsegmentation?

No. A host-based allowlist can be built with Windows Defender Firewall, nftables or firewalld on Linux, and the built-in firewalls of platforms such as Proxmox VE. Commercial products reduce the operational load with flow visualization, label management and central reporting; the difference becomes clear as scale grows.

Does microsegmentation replace VLANs?

It doesn’t replace them; it complements them. VLANs and subnets define broadcast domains and coarse zones; microsegmentation defines which flows are free between workloads within the same zone. When the two are used together, a compromised server can’t move freely to neighboring servers.

Can microsegmentation be applied to domain controllers?

It can, but it’s the role to handle last and most carefully. DCs receive connections from clients on many ports and the dynamic RPC range; a wrong rule breaks sign-in and group policy processing. Collect logs in monitoring mode for a long time first, and restrict management access separately.

After moving to enforcement, how do we quickly notice an application that breaks?

Always log blocked connections. On Windows, send the firewall log file or event 5157, and on distributed firewalls the block logs, to the SIEM and generate alerts for newly blocked source-destination-port triples. In the first weeks, review these alerts together with application owners.

Support

Contact us for support or a discovery session on this topic.

Contact form
[email protected]

Eretek Cybersecurity

Firewall, VPN, endpoint security and threat prevention. We reduce the attack surface and measure and report the risks.

Knowledge Center

Other articles