Lion Cipher Lab

Hide a service behind Single Packet Authorization

Why it matters

Every internet-facing admin service — SSH above all — is a permanent target the moment its port answers. Scanners find it within minutes, brute-force and credential-stuffing run against it forever, and a single unpatched 0-day in the daemon is game over regardless of how strong your passwords are. The highest-leverage move is not a better password but a smaller target: make the port answer nobody until the connection attempt has already been authenticated. Single Packet Authorization does exactly that, and it does it without the operational weight of a full VPN, which is why it belongs in the…

What you'll learn

Steps in this lab

  1. The threat model: an open port is a permanent target
  2. Port-knocking was the old idea — and why it fails
  3. Single Packet Authorization: the modern successor
  4. Install fwknop and set SSH to default-DROP
  5. Generate the SPA keys (Rijndael + HMAC)
  6. Configure the server: access.conf and fwknopd.conf
  7. Configure the client and build the SPA packet
  8. Prove it: invisible, knock, time-boxed open, expire
  9. Harden it, do it better, and know the failure modes
  10. Why this matters: authenticate before the stack sees a SYN

Open the full interactive lab →