Why the office should never reach the pump
Segmenting an OT network means splitting a plant's machines into zones and controlling every path between them. OT, operational technology, is the computing that runs physical things.
If any laptop can reach a PLC, Modbus will obey it. Zones and conduits decide who can reach what. You build and test them in your own lab only.
By the end of this lesson
Note
I can decide whether a flow between two zones is allowed by a deny-by-default table.
Key words
| Word | What it means |
|---|---|
| OT | operational technology, computing that runs physical things |
| Zone | a group of machines with the same trust and rules |
| Conduit | the one controlled path between two zones |
| Deny by default | refuse everything a rule does not allow |
| DMZ | a buffer zone between the business network and the plant |
The cells students fill in are left blank in this preview.
The one rule
Warning
Test filters and conduits only in your own lab copy. Probing a real plant's firewall, even to check it, needs written permission from its owner. Without it, it can be a crime under the Computer Misuse Act 1990.
Zones group machines, conduits join them
A zone is a group of machines with the same trust: the controllers, the operators' screens, the engineering stations, the business network.
Zones meet only through conduits: a firewall, a gateway or a one-way link. A conduit has a short list of what may pass. Everything else is refused, which is deny by default. The network security module taught firewalls; a conduit is one with a plant's rules.
Try it: a conduit that passes reads only
ALLOWED = [1, 2, 3, 4] # the conduit's allow-list: reads only
requests = [3, 4, 6, 5, 8]
for fc in requests:
if fc in ALLOWED:
print("function", fc, "pass to the PLC")
else:
print("function", fc, "deny, exception 1")
# The HMI now needs function 6 for one setpoint. What is the smallest change, and what does it cost?
The lab's conduit passes four functions
The lab's gateway sits in front of the PLC on port 5021. The HMI talks to the PLC only through it.
Its allow-list holds functions 1 to 4, the reads, for unit 1. A write gets exception 1 and a line in denied.log. The next Run tries both kinds through the gateway, then sends the same write straight to the PLC.
Send reads and writes through the conduit
docker exec work python3 steps/conduit.pyShown here, not run. Press Start lab to type it into your own lab’s terminal.
Read what the conduit refused
docker exec gateway tail -n 2 denied.logShown here, not run. Press Start lab to type it into your own lab’s terminal.
A common mistake
Warning
Many people think adding a filter protects the PLC. It protects only the paths that go through it. In the lab every container shares one flat network, so the work box reached the PLC directly and its write was accepted. A conduit works only when it is the sole path.
A conduit table, read top to bottom
A real site writes its conduits as a table: from which zone, to which zone, which service, and allow or deny. The first rule that matches decides. If none matches, the flow is denied.
The next Run checks six flows against four allow rules. Only the flows that a rule names get through.
Decide six flows from a conduit table
docker exec work python3 steps/zones.pyShown here, not run. Press Start lab to type it into your own lab’s terminal.
Worked example: what the lab decided
| From | To | Service | Verdict |
|---|---|---|---|
| enterprise | dmz | https | allow |
| enterprise | control | modbus-write | deny (no rule) |
| operations | control | modbus-read | allow |
| operations | control | modbus-write | deny (no rule) |
| engineering | control | modbus-write | allow |
The cells students fill in are left blank in this preview.