How to test network segmentation by hand, and where a one-off test stops.
Network segmentation testing by hand: a test matrix, one connection attempt per row from inside the source zone, a record of each result, and what one test leaves out.
The firewall rules say the office network is kept off the backup server. The diagram says the same. Neither of them tried the connection. To test network segmentation you sit a machine in the zone the traffic starts from, attempt the connection that is meant to be blocked, and write down what happened.
This is a method for doing that by hand, with tools already on the machine. It takes an afternoon for a small network. The last section says what the afternoon does not give you.
One line of the matrix at Orrindale Legal
Orrindale Legal moved floors in March. The new document-management server, DMS01, arrived the Friday before the move, and the server VLAN had not been trunked to the new comms room yet. To get the firm working on Monday, the engineer patched DMS01 into an office VLAN port and raised a ticket to re-home it once the trunk was in.
In September the same engineer worked through a test matrix for the firm's insurer. Row six read: Office PCs must not reach DMS01 on 3389 (RDP). The firewall rule for it was there and correct. From a paralegal's PC, the attempt connected at once.
The rule was never asked. DMS01 and the PC were on the same VLAN, so the traffic did not cross the firewall. The ticket was still open, six months old, with a note that said "temporary".
Reading the rule base would not have found it, because the rule base was right. One attempt from the right desk did.
Step 1: write the test matrix
A matrix is a list of paths. Each row is a source zone, a target with its address, the ports, and whether the path must be blocked or allowed. Write the rows from what the business needs, then check the network against them. Starting from the rule base only tests whether the firewall agrees with itself.
| # | Source zone | Target | Ports | Expected |
|---|---|---|---|---|
| 1 | Office PCs | BACKUP01 (10.20.5.10) | 445 (SMB), 3389 (RDP) | Blocked |
| 2 | Office PCs | DC01 (10.20.1.5) | 3389 (RDP), 5985 (WinRM) | Blocked |
| 3 | Guest Wi-Fi | FS01 (10.20.2.20) | 445 (SMB) | Blocked |
| 4 | Servers | FW-MGMT (10.20.0.1) | 443 (HTTPS), 22 (SSH) | Blocked |
| 5 | Servers | BACKUP01 (10.20.5.10) | 3389 (RDP), 22 (SSH) | Blocked |
| 6 | Backup server | FS01 (10.20.2.20) | 445 (SMB) | Allowed |
Row 6 is there for a reason. A server that is powered off, or a service that is stopped, looks exactly like a blocked path. One Allow row to the same target, from a zone that is meant to reach it, shows the target is listening. Then "blocked" on row 3 means the boundary held, and the file server was up while it did.
Start with the paths you would least like to find open: user networks to backups, user networks to domain controllers, guest Wi-Fi to anything internal, and whatever your last assessment pointed at. The starter policies list twelve to pick from, and the path calculator counts how many paths a network of your size has. It is usually more than the diagram suggests.
Step 2: try each connection from inside the source zone
The attempt has to start where the traffic would start. A test from the firewall's own diagnostics, or from your admin workstation, tells you about a different path. For row 1, sit at an office PC, or remote into one.
On Windows, in PowerShell:
Test-NetConnection BACKUP01 -Port 3389
On Linux:
nc -vz -w 5 10.20.5.10 3389
Each command makes one TCP connection attempt to one address on one port, and reports whether it was accepted. Run one per port in the row. Use the address as well as the name at least once, so a DNS gap is not mistaken for a blocked path.
Reading the result:
- Refused or timed out.
TcpTestSucceeded : Falseon Windows; "Connection refused" or "timed out" fromnc. Both count as blocked. A refusal means something answered and said no. A timeout means nothing answered, which is what most firewalls do with dropped traffic. - Connected.
TcpTestSucceeded : True, or "succeeded" fromnc. On a row marked Blocked, this is the finding. On the Allow row, it is the pass. - Timed out on the Allow row. Either the path is closed when it should be open, or the target is down. Fix that before you trust any Blocked result against the same target.
Keep to the rows. The method is the declared paths in the matrix, one attempt each, and it does not involve sweeping an address range to see what answers.
Step 3: record every result
A result nobody wrote down has to be run again the next time someone asks. For each attempt, record:
- who ran it;
- the machine it was run from, with its address and zone;
- the target address and port;
- the expected result and the actual one;
- the date and time, with the time zone.
Paste the raw output of the command under the row, or save the session transcript. If the insurer or an assessor asks later, the output is better evidence than a tick in a column. If you are reviewing the rules at the same time, the firewall audit checklist has a report template with a section for exactly these rows.
Where to be careful
Tell the security team first. A PC attempting RDP to a backup server looks like lateral movement to an EDR, because that is what lateral movement looks like. Agree the source machines and the time window before you start.
Test from each source zone. A rule can hold from the office VLAN and fail from the warehouse Wi-Fi, because the two are different objects in the rule base. Row 1 from one office PC says nothing about the second site.
Test from more than one machine if the zone is large. Orrindale's row six passed from the reception PC, which was on a different switch and VLAN from the paralegals.
Retest after each change. A firewall migration, a new site, a vendor rule, a device moved between ports: each one can reopen a row that passed last month. If you handle card data, PCI DSS segmentation testing has its own rules for how often and after which changes.
Where a penetration test fits
Network segmentation penetration testing and this method answer different questions. The matrix checks the paths you wrote down. A pentester looks for the ones you did not: the forgotten subnet, the dual-homed server, the management interface nobody listed. That work is still needed, and frameworks that ask for it by name mean it. The control map shows where each framework puts segmentation and what it asks for.
Keep the pentest. Add its findings to the matrix as new rows, so the path it found this year is one you keep testing.
Where a one-off test stops
The matrix you filled in describes one day. On that day, from those machines, each path did what the row says. The next firewall change is not in it, and neither is the Friday someone patches a server into the nearest free port.
Most segmentation is designed well and then drifts, and a test run by hand finds drift only on the days someone runs it. Orrindale's server sat on the wrong VLAN for six months, and nothing was broken, so nobody looked.
Segproof takes the same matrix and keeps running it. You declare each row as a policy: a source zone, targets, ports, and blocked or allowed. An agent in the source zone attempts those connections on a schedule, as often as every 5 minutes on Paid and once a day on Free. Agents attempt only the connections you declare. They never try an address range.
When a blocked path connects, the alert names the agent, the address, the port and the minute it changed. On a 5-minute policy it arrives within 7 minutes of the path opening. Every result is kept, so the record covers the days between your tests as well as the days you ran one.
Done by hand, the method above gives you one day you can show. The rest of the year is the part still missing.