Segmentation and policy tests
Separate networks by purpose and trust
Segmentation divides a network into zones with different communication requirements. A DMZ (demilitarized zone) is a perimeter segment intended to host services reachable from less trusted networks while limiting their access to internal resources. VLANs and subnets can create boundaries, but a routing firewall or another enforcement point must apply the intended policy between them. Consider a fictional store with a public web tier, a private database and a dedicated management host. Every inter-zone path in this model crosses the same firewall; all addresses are documentation examples, not public lab endpoints.
External 192.0.2.0/24 ----+DMZ web 198.51.100.20 -----+-- [Policy firewall]Internal DB 203.0.113.30 --+Admin 203.0.113.130 -------+Internal and admin are separate /25 zones.Start with a policy matrix
Write the required new flows before translating them into device configuration. External visitors need HTTPS to the DMZ web server; the web server needs TCP 5432 to the private database; the specific admin host needs SSH to the web server. The remaining new inter-zone flows are denied in this fictional policy. Matching replies are allowed by the stated stateful rule. The DB service still needs its own authentication, least-privilege accounts and encrypted connections where appropriate. A permitted port does not prove that the expected application is using it.
New flows (source -> destination, protocol/port):External subnet -> DMZ web .20 : TCP 443 ALLOWDMZ web .20 -> Internal DB .30 : TCP 5432 ALLOWAdmin host .130 -> DMZ web .20 : TCP 22 ALLOWAll other new inter-zone flows: DENYValid matching replies: ALLOWTest what must work and what must fail
A positive test verifies that a required flow is permitted; a negative test verifies that an unintended flow is denied. In this example, external HTTPS to the web server is positive; external access to the database is negative. Test the correct source, destination, protocol, port and direction, and include a wrong source and wrong port near a rule boundary. Keep expected filter decisions separate from expected application results: the firewall can allow a flow whose server refuses the connection. For an actual deployment, check IPv4 and IPv6 policies separately, necessary ICMP/ICMPv6 control traffic, routes, return paths and host-level rules. The example is an IPv4-only new TCP/UDP flow policy, not a complete production policy.
External -> Web TCP 443: ALLOWExternal -> DB TCP 5432: DENYWeb -> DB TCP 5432: ALLOWWeb -> DB TCP 22: DENYAdmin .130 -> Web TCP 22: ALLOWAdmin .131 -> Web TCP 22: DENYApplication-aware inspection and its limits
Some firewalls and proxies use application protocol information or identity in addition to addresses and ports. This can enforce policies that cannot be expressed by a destination port alone. Encrypted traffic limits what a network observer can read; any authorized TLS termination introduces a separate trust boundary and privacy responsibilities. Network segmentation reduces exposure but cannot replace authorization inside an application. A reverse proxy, host firewall and application may each enforce different parts of the overall policy. Document which component owns which decision rather than assuming every product has the same features.
Review changes without losing access
Before an authorized change, record the current policy, intended new policy, owner, test cases and recovery path. Preserve independent management access, prepare a reviewed rollback, verify the expected allowed and denied flows in an isolated lab and check relevant logs or counters without collecting private payloads. If a necessary flow fails, identify its precise failing condition rather than adding broad access. In this paper exercise, an unrelated admin address .131 must remain denied even if .130 can connect. No network changes are required to complete the task. Next: VPN and tunneling foundations. Sources: NIST SP 800-41 Rev. 1 publication summary and NIST DMZ glossary; nftables manual.
Check Your Understanding
Solidify your learning with the interactive assessment directly below this lesson.
Concept Quiz & Questions
Segmentation and policy tests — knowledge check
Apply concepts to fictional firewall policy scenarios.
Which new flow is allowed by the example DMZ policy?
Which test is a negative test for the example policy?
What does a firewall allow verdict alone prove?
Why is application authorization necessary even after network segmentation?
What should be ready before an authorized firewall policy change?