2026-2027 Defence Network Security Physical Security In Progress

Overview

A campus is secure when three things hold at once: the right person, and only the right person, gets onto the right part of the network; anything that misbehaves is seen and contained; and the buildings themselves, their doors, sensors and plant, are watched and maintained. Most labs build one of those. This one builds all three as a single system and tests them together.

The campus is fictional: Kestrel Point, three buildings (headquarters with the server room, a secure operations building, and a support building with a clinic, a lab, a hangar, quarters, a utilities plant and a magazine). Thirty machines run it: two core firewalls, three building switches, workstations, door controllers, cameras, building sensors, servers, three remote VPN users and a simulated internet. Every one of them is configured from one file, campus/campus.yaml, so the firewall, the RADIUS servers, the IDS rules, the SIEM and the facilities database cannot disagree about who is allowed where.

Everything is in a repository: github.com/TYFSADIK/secure-campus-testbed, with the renderer, the Ansible roles, the NAC agent, the campus-ops service, the device simulators, 31 unit tests and the rehearsal that produced every number on this page.

The DND Project

From the public Defence Capabilities Blueprint catalogue. The extract I worked from lists this project by name and tags; it does not give an objective, funding range or schedule, so none is claimed here.

ItemPublic detail
ProjectNational Defence Secure Campus
Capability areaReal Property (INFRA)
Investment areasPhysical Security Systems; Office and Administrative Infrastructure
What this build takes from itA secure, multi-building office campus: who and what may enter which buildings, rooms and networks, and how the facility is run and kept available

One System, 33 Register Entries

My project register gives about thirty Real Property campus projects the same five proposed requirements: define the facility's zones, users and assets; model rooms, assets, maintenance, inspections and access events; run an asset register, work orders, an inspection schedule and a dashboard; add role-based access, audit, backup, availability and safety checks; and test outages, the work-order lifecycle, access control and restore. Building that thirty times would prove nothing new each time. So the campus meets it once, and each kind of building is a facility profile: the inspections, environmental limits and access rules of an office, a server room, an operations floor, a clinic, a lab, a hangar, quarters, a utilities plant or a magazine.

How it is coveredRegister entries
Directly, the whole campus#89 National Defence Secure Campus
Network access control and the CIS server room#41 Construct New Communications and Information Systems Building, Petawawa (tagged Access Management Systems)
Secure operations profile (doors, two-person room, intrusion tests)#72 Joint Task Force 2 Infrastructure; #25 CSOTC Petawawa; #56 Future Combined Aerospace Operations Centre; #94 New Quick Reaction Area, Bagotville; #23 CJIRU Trenton
Office profile#1 21 EW Regiment, Kingston; #34 2 Service Battalion HQ, Petawawa; #36 CAF TC Edmonton; #51 Edmonton Strategy; #33 MFRC Petawawa
Health profile (vaccine fridge limits, medical gas)#38 Bagotville, #61 Gagetown and #62 Valcartier health services centres
Laboratory profile (fume hoods, eyewash)#39 DRDC ORC; #66 DRDC Valcartier renewal; #53 Energetic Materials Test Lab; #93 Neurobehavioral Facility, Suffield
Hangar and workshop profile#2 427 SOAS hangar; #4 436 Squadron; #9 AFEC main facility; #35 Ammunition Workshop; #110 Refueling Tender Garage
Accommodation profile#10 AFEC mess; #37 Cambrai Rd quarters; #73 JNCM accommodation, Esquimalt; #40 Yellowknife multi-purpose building; #106 North Park Armoury
Utilities profile (mains loss, generator, boiler)#59 Halifax heating; #111 underground electrical distribution; #105 19 Wing roads and utilities
Magazine profile#104 Recap Magazine Area, Dundurn

Seven Real Property entries are left out because their work is civil engineering rather than a campus building: jetties, a runway, a remote naval facility, a fighter infrastructure programme, a diving unit, a school relocation, and Camp Sustain, which is a deployable camp. The list is generated from a YAML file in the repository, so it cannot drift from the code.

One system, five layersEvery layer is rendered from one campus file and configured by the same Ansible run.Access802.1X PEAPper personMAB boundto the portQuarantine andguest fallbackNetwork14 VLANsper-building devicesVRRP + STPtwo coresWireGuardthree groupsPolicynftablesdefault denyOPNsense configsame policyDrop logsto JSONDetectionSuricatacampus rulesWazuhcorrelationActive responseboth coresFacilitiesAssets, zones9 profilesDoors andtwo-person ruleWork orders,inspectionsAudit chain,backups
Figure 1. The five layers of the one system, all rendered from the same campus file.

Target Design

NeedTestbed componentDesign requirement
Three-building topologycontainerlab (rehearsal), Proxmox (build)30 nodes wired only by lab links, no management back door around the cores
Department VLANs14 VLANs, 802.1XPeople get their department's VLAN wherever they plug in; device VLANs per building
Inter-VLAN routingCollapsed core, keepalived, STPTwo cores share every gateway; either can carry the whole campus
Firewall policiesnftables; OPNsense config for the Proxmox optionDefault deny, every allowed flow listed once, drops logged
802.1Xhostapd, NAC agent, FreeRADIUS x2PEAP with server certificate checks, MAB bound to ports, quarantine and guest fallback
VPNWireGuard on both coresThree user groups with their own rules; survives a core failure
MonitoringSuricata, Wazuh, NFLOGCampus rules, correlation, automatic quarantine on both cores, incidents in campus-ops
Facilities and physical securitycampus-ops (FastAPI, PostgreSQL), door and sensor simulatorsAssets, profiles, alarms, work orders, inspections, door control, audit, backups
AutomationAnsibleEvery node, idempotent, the same roles for the rehearsal and Proxmox
Tested recoveryRehearsal suiteSegmentation, failover, restore, all measured by probes inside the endpoints

The Campus

Three buildings, two coresA simulated internet on top. Two core firewalls share every gateway address with VRRP and form one STP domain. Each building switch has an uplink to each core; STP blocks the core-b uplink until it is needed. The server room in building 1 holds campus-ops, its database, RADIUS and Wazuh.Simulated internetpublic web and DNS, VPN users' home networkscore-a (active)nftables, VRRP, DHCP, WireGuard,SuricataB1 server roomcampus-ops, PostgreSQL, radius-1,Wazuhcore-b (standby)same configuration, takes over in 9 ssw-b1802.1X, MAB, guest lobby portstaff, admin, door, camera, airhandlerplus a visitorsw-b2802.1X, MAB, BPDU guardoperations, secure-room door,cameraradius-2 and the backup storesw-b3802.1X, MAB, isolated device portsclinic, lab, fridge, meter,generatormagazine and plant doorsB1 HEADQUARTERS AND CISB2 SECURE OPERATIONSB3 SUPPORT
Figure 2. Kestrel Point: a simulated internet, two cores, three buildings, one server room.
VLANNameWhoMay reach
10MGMTSwitches, network adminsRADIUS, DNS, syslog to Wazuh
20STAFFAdministrative staffcampus-ops, DNS, the web
30OPSSecure operationscampus-ops and DNS only, no internet
40HEALTHCliniccampus-ops, DNS, HTTPS only to the internet
50LABLaboratorycampus-ops, DNS, the web
61-63BMS, one per buildingAir handlers, meters, fridges, generatorcampus-ops only
71-73PHYSEC, one per buildingDoor controllers, camerascampus-ops, syslog to Wazuh
80GUESTVisitors on lobby portsThe internet only
100SERVERScampus-ops, database, RADIUS, WazuhEach other, the web for updates
999QUARANTINEAnything not authenticatedNothing: no gateway, never on a trunk

Device VLANs are per building so a door controller in one building can only meet a device in another through the firewall, and device ports on the same switch are isolated from each other. VPN users get their own address ranges: remote staff reach campus-ops, the HVAC contractor reaches building management on HTTPS and Modbus, network admins reach management and servers.

Plugging In: 802.1X and MAB

Every access port starts in quarantine. A person logs in with 802.1X (PEAP, and the laptop only trusts the campus CA and the RADIUS server's name, so a fake switch cannot harvest passwords). RADIUS answers with the VLAN of that person's department, so the VLAN follows the person to any port in any building. Devices that cannot do 802.1X, door controllers, cameras and sensors, are checked by MAC address against the asset register, and each entry only matches on the switch port the register puts that device on.

One piece had to be written: hostapd, the Linux 802.1X authenticator, can read the VLAN from RADIUS but cannot apply it to a port of a VLAN-aware bridge. A small NAC agent on each switch relays hostapd's RADIUS packets unchanged, so the cryptographic checks still hold, moves the port into the right VLAN before hostapd sees the reply, fails over between the two RADIUS servers, runs MAB, and reports a MAC that appears on two ports at once.

Plugging in: 802.1X and MABhostapd on the switch port speaks 802.1X; the NAC agent relays RADIUS to whichever server answers, reads the VLAN from the Accept and moves the port before the reply reaches hostapd. A device that never speaks 802.1X is checked by its MAC address, bound to its switch port.Endpointhostapd (port)NAC agentradius-1 (B1)radius-2 (B2)port starts in quarantine (VLAN 999)1. EAP-PEAP, campus CAchecked2. RADIUS Access-Request3. relay unchanged4. Accept, VLAN of thedepartment5. move the port intothat VLAN6. Accept passed on7. EAP-Success; DHCP inthe new VLANradius-1 silent: the agent asks radius-2 (4 s)
Figure 3. A login: the NAC agent relays RADIUS and sets the port's VLAN.

Segmentation and the Firewall

The policy is a short list in the campus file: who may reach what, on which ports. The renderer turns it into the nftables ruleset both cores run, into an OPNsense configuration for the Proxmox option, into a policy table for the documentation, and into a test matrix of 267 probes from 15 real endpoints: every allowed flow must pass and every other must be blocked. Every probe target runs a listener, so "blocked" means the firewall stopped it, not that nothing was there.

The two cores share every gateway address with VRRP and form one spanning tree; each building switch has an uplink to each core. DHCP runs on both with split pools and identical reservations. A drift check compares each core's live ruleset with the one Ansible loaded, and Ansible puts it back if someone changes or wipes it.

Detection and Response

Suricata runs on both cores with campus rules: scans and admin or database ports from device VLANs, guests probing the campus, a blocked domain, scanner tools, every Modbus write to a building controller, database connections from outside the server VLAN. Wazuh reads those alerts, the firewall's drop log, every RADIUS decision, and syslog from the switches and doors, and correlates them: five failed logins on one port, a MAC on two ports, one badge refused three times. A level 10 alert puts the source address in a set both cores drop for ten minutes and opens an incident with a P1 work order in campus-ops, linked to the asset that owns the address.

A compromised door controller, caughtThe door controller scans the server VLAN. Suricata on the core flags it, Wazuh raises a level 10 alert, both cores drop the address, and campus-ops opens an incident with a P1 work order. The door keeps deciding from its cached list and queues its events.Door controllerCore (Suricata)Wazuhcampus-ops1. SYN to admin and database ports2. eve.json alert, 0.08 s3. active response: quarantine onboth cores, 1.8 s4. incident and P1 work order, 2.2 sbadge swipes still decided at the door, queued5. queue delivered after release
Figure 4. A compromised door controller, from scan to quarantine and incident, with the times from the final run.

The Buildings: campus-ops

campus-ops is the facilities and physical security side: an asset register of 30 assets, zones with their profiles, people with roles and badge clearances, sensor readings checked against each profile's limits, work orders, inspections, door events and security incidents. Every change goes into a hash-chained audit log, and the database is backed up every two minutes to a store in the second building.

  • Alarms: a vaccine fridge above 8 °C, a boiler over pressure, a device silent for 30 s, mains lost with the generator not starting within 20 s. Each opens a work order, P1 when the limit or the asset is critical.
  • Work orders: open, assigned, in progress, completed, verified, closed. Only the assignee works an order, a completion needs a note, and whoever completed it cannot verify it. Contractors see only their own orders, only in the zones they are cleared for.
  • Doors: controllers sync an access list every 10 s and decide at the door, by clearance, opening hours and the two-person rule for the secure room and the magazine, so doors keep working if campus-ops or the network is down. Events are numbered, queued and delivered exactly once.
  • Inspections: scheduled from the profiles (fire suppression, UPS, fume hoods, generator runs, lightning protection); overdue ones become work orders and a failed one opens a corrective order.
campus-ops dashboard after a test run: the zones of three buildings, all normal, a list of open work orders from sensor alarms and IDS incidents, and the security incidents with the asset each one belongs to
The campus-ops dashboard after the final test run: every zone back to normal, and the work orders and incidents the tests left behind.

Measured Results

The final run, on a lab rebuilt from scratch: 110 of 110 checks in eight scenarios, about 18 minutes. Outages are measured by endpoints that probe every 0.2 seconds during each failure. These numbers come from the rehearsal on a laptop; the Proxmox build will be measured with the same suite.

Longest outage per failure (s)Longest run of failed probes seen by endpoints probing every 0.2 s, final rehearsal run.core-a power loss8.8 s every buildingcore-a power loss, VPN user15.3 s WireGuard re-handshakecore-a returns (preempt)8 s 6 to 8 sbuilding uplink cut8 s 802.1D STPcampus-ops database dropped4.7 s restored from building 2firewall wiped26.7 s Ansible restore
Figure 5. Longest outage seen by the endpoints in each failure of the final run (seconds).
MeasuredResult
Segmentation267 probes from 15 sources (27 allowed, 240 blocked): 0 mismatches. Probing the blocked ports got 11 of the probers quarantined by the IDS
802.1X login to VLAN1.4 s, and about 1.7 s more for the DHCP address
RADIUS failoverLogin through radius-2 in 4.0 s; with both down, new logins fail closed and logged-in users keep working
Cloned MACSame switch: caught in 5 s, Wazuh level 12, real device unaffected. Another switch: refused by MAB
Rogue switch claiming STP rootPort disabled by BPDU guard, campus root unchanged
Door controller scanning serversSuricata 0.08 s, Wazuh 1.8 s, quarantined on both cores 1.8 s, incident and P1 work order 2.2 s
Doors with campus-ops stopped20 swipes decided at the door; all 20 events delivered exactly once in under 0.1 s once it was back
Badge suspendedRefused at the door 1.1 s later
Vaccine fridge out of rangeCritical alarm and P1 work order in 1.3 s
Core power loss, and return8.8 s for every building (15 s for a VPN user); 6 to 8 s on return
Building uplink cut8.0 s (802.1D spanning tree)
Firewall wiped on the active coreDrift detected; restored by Ansible in 27 s
Database droppedRestored from building 2 in 4.7 s, row counts and audit chain verified
SIEM down 60 sAgent events delivered after restart; UDP syslog from switches and doors lost
Audit tamperingOne edited row in the database: verification names that row
AnsibleA second full run over 30 hosts changes nothing

What the Tests Found

The suite ran about twenty times while the lab was built. Most failures were in the tests; these were in the campus, and two of them would bite a real one:

FaultWhyFix
Losing a core took 38 s instead of 9The standby core announced the gateway addresses while the building switches were still in spanning tree's listening and learning states; the announcements were dropped and clients kept the dead core's MAC until their ARP entries expiredkeepalived repeats its gratuitous ARP every 2 s while master
VPN users did not follow a failoverWireGuard peers move to the source address of the server's packets; the cores answered from their own addresses. Source NAT fixed the address but, clashing with the peer's own connection entry, could change the portWireGuard bypasses connection tracking and its source address is rewritten statelessly; the tests check address and port
A cloned MAC knocked the real door controller offlineThe agent quarantined whichever port changed lastThe port where the MAC is already authorised keeps it
A healthy door controller was quarantinedIts HTTPS retries to campus-ops looked like a SYN sweepThe sweep rule leaves out the service port
Every 802.1X login was rejected at firstFreeRADIUS could not write its JSON log, and the failing log call turned each Accept into a RejectThe log file is created for the RADIUS user first
One lost badge opened six P1 work ordersDoor incidents were not mergedRepeats within 10 minutes count on one incident

How to Build It

Rehearse first (Docker with 5 GB, about 15 minutes to build)

git clone https://github.com/TYFSADIK/secure-campus-testbed && cd secure-campus-testbed
./local/rehearse.sh up      # render, build two images, deploy 30 nodes, run Ansible
./tools/nac-status.sh       # every access port: VLAN, method, user
./local/rehearse.sh test    # 8 scenarios, about 18 minutes, then results/run-N/
./local/rehearse.sh down

Then the Proxmox build

./proxmox/create-lab.sh apply   # on the host: one bridge per lab link, 30 LXC containers
./proxmox/bootstrap.sh          # packages through a temporary NIC, removed afterwards
KP_TARGET=proxmox KP_PVE_HOST=pve python3 tools/render.py
ansible-playbook ansible/site.yml   # the same roles, over pct

To change the campus, edit campus/campus.yaml and run Ansible again: a new person, device, VPN user, allowed flow or kind of building is one entry, and the renderer refuses a campus with errors.

Spec-Gap and Status Table

CapabilityStatus
802.1X, MAB, quarantine, guest, BPDU guardMeasured in the rehearsal
Segmentation and firewall policyMeasured in the rehearsal (267 probes)
Core, uplink and RADIUS failoverMeasured in the rehearsal
WireGuard VPN with failoverMeasured in the rehearsal
IDS, SIEM, active response, incidentsMeasured in the rehearsal
Facilities, doors, work orders, inspections, audit, backup and restoreMeasured in the rehearsal
Proxmox buildWritten; not yet run
OPNsense core (CARP pair)Configuration rendered; not yet booted
Wazuh indexer and dashboardProxmox build only
Rapid spanning tree (sub-second uplink failover)Not in the Linux kernel; real switches or mstpd
Real door hardwareSimulated

Safety Notes

Independent work: not affiliated with, funded by, or submitted to DND or the CAF. It uses only the public catalogue, models a fictional campus with fictional people, badges and devices, and touches no government network, site or system.
Contained: the attacks in the tests (scans, password guessing, MAC cloning, a rogue switch) run only between containers on my own machine, wired with no path to any other network. Lab passwords, keys and certificates are generated locally and never published.

Frequently Asked Questions

What is the National Defence Secure Campus project?

It is a Real Property (infrastructure) project listed in National Defence's Defence Capabilities Blueprint, tagged with the investment areas Physical Security Systems and Office and Administrative Infrastructure. The public catalogue extract this build works from gives its name and tags, not a technical specification.

Is this build part of the DND project?

No. It is an independent, personal research build on a fictional campus. It is not affiliated with, funded by, or submitted to DND or the CAF, and it models no real site, system or standard.

Why one system instead of separate projects?

The register proposes the same five requirements for about thirty Real Property campus projects: zones and an asset register, work orders and inspections, access events, role-based access with audit and backup, and outage and restore tests. One campus with a facility profile per kind of building meets them once, and the network and security around it are what a secure campus needs anyway.

Which tools does it use?

hostapd and FreeRADIUS for 802.1X, my own NAC agent for dynamic VLANs and MAB, nftables (and an OPNsense configuration for the Proxmox option), keepalived for VRRP, dnsmasq, WireGuard, Suricata, Wazuh, PostgreSQL and a FastAPI service for facilities, Ansible for every node, and containerlab for the rehearsal.

What has been measured?

Everything in a rehearsal of all 30 nodes on one machine: 110 of 110 checks, a 267-probe segmentation matrix with no mismatches, 1.8 seconds from a scan to quarantine on both cores, an 8.8 second outage when a core firewall loses power, and a 4.7 second database restore from another building. The Proxmox build is written but not yet run.

What Happens Next

Build statusThe code and the rehearsal are done and measured; the Proxmox build and the OPNsense core come next.PHASE 1 · DONECoderender, NAC agent,campus-ops; 31 testsPHASE 2 · DONERehearsal30 nodes, 110 of 110checksPHASE 3 · NEXTProxmox buildLXC per node, one bridgeper linkPHASE 4 · NEXTOPNsense coreCARP pair, same policyPHASE 5 · NEXTReal hardwarea managed switch and adoor reader
Figure 6. Build status.
  • Next: the Proxmox build, then the same eight scenarios, published here next to the rehearsal numbers.
  • Then: an OPNsense CARP pair in place of the Linux cores, with the same policy, and the Wazuh indexer and dashboard.
  • Later: one real managed switch with 802.1X and a real door reader, so a building is partly physical.

Cite This Page

Citation formats

Plain text

Taki Sadik, "Secure Campus Testbed: One System for the Network, Its Security and Its Buildings", TYFSADIK, https://tyfsadik.org/work/defence/national-defence-secure-campus (accessed 2026-11-28).

BibTeX

@misc{sadik-secure-campus-testbed,
  author  = {Sadik, MD. Taki Yasir Faraji},
  title   = {Secure Campus Testbed: One System for the Network, Its Security and Its Buildings},
  year    = {2026},
  url     = {https://tyfsadik.org/work/defence/national-defence-secure-campus},
  urldate = {2026-11-28}
}

APA

Sadik, M. T. Y. F. (2026). Secure Campus Testbed: One System for the Network, Its Security and Its Buildings. TYFSADIK. https://tyfsadik.org/work/defence/national-defence-secure-campus