Software-Defined Perimeter lab
Services stay invisible behind a default-deny gateway. A client sends one encrypted, authenticated packet; the gateway opens a path for that client alone, for thirty seconds.
docker compose upThe gateway connects to the controller over mutual TLS and receives the service and access lists.
The problem
A service that answers everyone can be found, fingerprinted and attacked before any credential is checked. A Software-Defined Perimeter turns that around: nothing answers until the client has proven who it is.
Any reachable port shows up in a sweep of the network.
Versions and software leak before authentication.
A pre-authentication bug is enough to get in.
Illustration of the mechanism, not a measurement.
How it works
The controller runs the PKI and the policy. The gateway drops everything and listens for Single Packet Authorization. A valid packet opens a short-lived rule for one client, one service and one address.
Every member authenticates to the controller with mutual TLS; the gateway gets its access list.
The client sends a single encrypted, HMAC-authenticated SPA packet with fwknop.
fwknopd adds DNAT and FORWARD rules for that client's address and removes them after 30 s.
$ docker compose logs -f sdp-gateway [gateway] SDP ID 1 listening for SPA on eth1 (10.231.0.20) (sdp_ctrl_client.c:627) Credentials-good message received Added service entry for Service ID 1 Added access entry for SDP ID 3 Starting fwknopd main event loop. (stanza #0) SPA Packet from IP: 10.231.0.40 received with access source match Added FORWARD rule to FWKNOP_FORWARD for 10.231.0.40 -> 10.231.1.30 port 80 Added DNAT rule to FWKNOP_PREROUTING for 10.231.0.40 -> 0.0.0.0/0 port 8080 Removed rule 1 from FWKNOP_FORWARD with expire time of 1794560303
Recorded from the lab. Full sequence diagrams →
Run it
The controller creates the CA and every member's keys on first start; nothing secret lives in the repository. The demo script checks the whole flow and fails loudly if anything is off.
sdp-gateway:
build: ./gateway
cap_add: [NET_ADMIN, NET_RAW] # iptables + SPA sniffing
sysctls:
net.ipv4.ip_forward: "1"
volumes:
- type: volume
source: bundles # its own credentials only
target: /bundle
read_only: true
volume: { subpath: "1" }
networks:
sdp-public: { ipv4_address: 10.231.0.20 }
sdp-private: { ipv4_address: 10.231.1.20 }
$ cp .env.example .env $ docker compose up -d --build --wait $ ./scripts/demo.sh [1/4] Request before SPA PASS service hidden [2/4] Private network PASS unreachable [3/4] fwknop -n service_gate PASS SPA accepted [4/4] Request after SPA PASS HTTP 200 All checks passed.
Requirements, start, demo, logs and reset.
Quick start →Networks, components, bootstrap and access sequences.
Architecture →Environment, members, services and adding clients.
Configuration →Subnets, capabilities, keys and the usual errors.
Troubleshooting →Results
SecureSDP also hardens each SDP component with Egida, using controls that do not break the services it runs. The paper audited the controller with three tools, before and after applying them.
Hardening index of the host; warnings and suggestions count as failures.
CIS Distribution Independent Linux benchmark profile.
CIS Level 1 Server profile for Ubuntu 20.04 LTS.
As reported in Payá et al., IJIS 2024, Table 2 (SDP controller). Not regenerated with this lab, whose containers are not hardened with Egida.
No. It is a research and teaching lab. The upstream SDP controller and fwknop fork are no longer actively maintained; review credentials handling and firewall rules before reusing any part of it.
It adds the SDP control channel: fwknopd receives its service and access lists from the
controller over mutual TLS instead of a static access.conf, and clients rotate
their keys on every session.
Yes. Add rows to the seed data and a client service in Compose; the configuration guide walks through it.
No. Egida hardens full hosts through Ansible, which does not fit containers. To reproduce the hardening results, deploy the components on virtual machines and run Egida there.
Both accompany the same article. This lab runs the Waverley Labs SDP; Secure-SDP is a Go implementation of the Bridge model described in the paper.
Cite the SecureSDP article in the International Journal of Information Security 23(4), 2793–2808, 2024. BibTeX is on the paper page.
Clone the lab, start it and watch a service disappear until you knock.
git clone https://github.com/antoniopaya22/Software-Defined-Perimeter && cd Software-Defined-Perimeter