Homelab Academy / Modules
Learn: instruction, vocabulary, worked example.
Module: Segmentation, Backup & Power
Activity type: Reading (Learn)
Objective: Define zones as groups of systems with similar trust and policy requirements.
| Term | Meaning |
|---|---|
| zone | A named group of systems with similar trust, function, and traffic-policy requirements. |
| trust boundary | A point where traffic moves between security contexts and must be explicitly evaluated. |
| segmentation | Dividing a network into policy-controlled zones to limit reachability and reduce lateral movement. |
| least privilege | Granting only the network access required for a defined function and denying broader access. |
| first-match processing | Evaluating ordered rules from top to bottom and stopping at the first rule whose conditions match. |
| shadowed rule | A rule that cannot take effect because an earlier, broader rule matches the same traffic first. |
| default deny | A final policy position that rejects traffic unless an earlier explicit rule permits it. |
| RFC 1918 | The standard reserving 10.0.0.0/8, 172.16.0.0/12, and 192.168.0.0/16 for private IPv4 networks. |
| RFC 5737 | The standard reserving 192.0.2.0/24, 198.51.100.0/24, and 203.0.113.0/24 for examples and documentation. |
| positive test | A test proving that specifically authorized traffic is allowed by the intended rule. |
| negative test | A test proving that unauthorized traffic remains denied. |
Segmentation is not merely the creation of subnets. A subnet becomes a meaningful security boundary only when traffic crossing that boundary is governed by an explicit, testable policy. A useful design starts with assets and required flows: who initiates a connection, where it goes, which protocol and port it uses, and why the connection exists. Systems with similar roles and trust assumptions are grouped into zones. In this lesson, administrators, users, servers, monitoring systems, and an external documentation network are separate zones. The monitoring zone is not merged with the administrator zone because collecting metrics does not justify interactive administrative access.
The policy follows least privilege. Administrator SSH and user HTTPS are separate grants because they serve different purposes. Monitoring receives only TCP 9100 and TCP 9115 access to servers. A final default-deny rule handles every flow that was not explicitly approved. Rule order is security-relevant: the simulator uses first-match processing, so a new allow placed after the catch-all deny is syntactically present but operationally useless. This is called shadowing. A change is not complete merely because a rule appears in a file; tests must prove both the decision and the exact matched rule name.
CIDRs are modeled as part of each zone rather than as decorative documentation. Every flow includes source and destination IP addresses, and the evaluator verifies that those addresses belong to the declared source and destination zone prefixes before applying policy. The internal zones use RFC 1918 private addresses. The external test zone uses 203.0.113.0/24, one of the RFC 5737 documentation prefixes. RFC 5737 space is safe for examples but is not private production address space and should not be treated as an Internet-routable target. The lab deliberately avoids changing packet filters, routes, interfaces, forwarding settings, or services on the host. All policy mutation occurs in JSON below the class workspace, allowing rule-order behavior, recovery, and auditing to be practiced without risking remote access.
File-backed Python simulator
Top to bottom, first matching rule wins
No implicit allow exists; the policy contains an explicit final default-deny rule
Before rule evaluation, each source and destination IP must belong to the CIDR declared by its stated zone
Zone labels and CIDRs are both enforced by the simulator; no host packet filter is changed
10.71.10.0/24
RFC1918
Privileged administration clients
May initiate approved management connections but is not universally trusted.
10.71.20.0/24
RFC1918
Application and infrastructure services
Accepts only explicitly required administration, application, and monitoring traffic.
10.71.30.0/24
RFC1918
General client systems
May consume published services but receives no administrative path.
10.71.40.0/24
RFC1918
Metrics and availability collectors
Separated from administration and limited to TCP 9100 and TCP 9115 toward servers.
203.0.113.0/24
RFC5737
Documentation-only external traffic model
Represents an untrusted boundary in this simulation; the prefix is reserved for examples and is not presented as real Internet space.
admin
servers
TCP 22
Administrative SSH
users
servers
TCP 443
Published HTTPS application
servers
external-test
TCP 443
Simulated outbound HTTPS
monitoring
servers
TCP 9100
Node metrics collection added during the change
monitoring
servers
TCP 9115
Black-box metrics collection added during the change
users
servers
TCP 22
General users do not receive administrative access.
external-test
admin
TCP 22
An untrusted external zone must not initiate administration access.