A self-built lab that reproduces, end to end, how a modern enterprise keeps its network both secure and consistent. It pairs zero-trust style endpoint authentication with a fully automated, desired-state configuration pipeline — the same building blocks used in production NAC deployments, integrated from scratch rather than bought off the shelf.
- Certificate-based access (EAP-TLS) removes shared passwords and blocks credential-based attacks at the switch port itself.
- Guests are contained behind a pfSense firewall and captive portal, fully isolated from corporate VLANs.
- Every switch configuration is generated from a single source of truth (NetBox) and version-controlled in GitLab — no manual CLI changes.
- Compliance jobs detect drift and auto-remediate, so the network continuously self-heals back to its intended state.
Architecture
802.1X employee authentication
When an employee connects, the switch forwards the 802.1X request to FreeRADIUS, which validates the client certificate against the PKI. Access is granted only if the certificate is trusted, and the matching access policy is then applied to the port.
Guest access — pfSense firewall & captive portal
pfSense acts as the perimeter firewall: guest HTTP/HTTPS traffic is intercepted and redirected to a captive portal. Once the guest authenticates, a restricted guest policy is applied, keeping untrusted devices isolated from the corporate network.
Inventory & automated deployment
NetBox is the single source of truth for switch names, IP addresses, roles and site information. AWX pulls this inventory through the NetBox API, clones the playbooks from GitLab and runs Ansible jobs to push AAA, VLAN, 802.1X, SNMP and SSH-hardening configurations to the switches.
Compliance & automated remediation
The compliance job audits 15 rules per switch and reports every drift. It verifies that the HTTP server, PAD and BOOTP services are disabled, that CDP and LLDP are turned off, that the SSH_ADMIN_ONLY ACL exists and is applied to the VTY lines (with login local and SSH-only transport), that a secure SNMPv3 group and admin user are configured with SNMP traps enabled, and that DHCP snooping and dynamic ARP inspection are active. When drift is detected, remediation playbooks reapply the missing configuration and correct unauthorized changes — enforcing a true desired-state model.
PKI & security
The EAP-TLS infrastructure relies on a Root CA issuing server and client certificates to authenticate employees, secure TLS exchanges and prevent credential-based attacks. Private keys, certificates, real-IP inventories and vault files are kept out of the repository, with encrypted variables and restricted access policies.