About fwknop
fwknop, short for FireWall KNock OPerator, implements Single Packet Authorization (SPA), described as a next generation of port knocking. It works with a default-drop packet filter and libpcap, and supports iptables and firewalld on Linux, ipfw on FreeBSD and Mac OS X, and PF on OpenBSD.
A client sends a single encrypted packet that carries the requested access through the firewall policy, or even commands to run on the target. The server side passively sniffs these packets, so there is no listening server in the traditional sense, and access is granted only after an authenticated, decrypted, non-replayed packet is seen.
The main use is to add a layer of protection to services like OpenSSH. According to the author, someone scanning with nmap cannot tell that sshd is listening, which makes both password cracking and 0-day exploits much harder. The site offers a tutorial, documentation, source on GitHub, and lists 2.6.11 as the latest release.
Key features
- Single Packet Authorization instead of multi-port knocking
- Asymmetric cipher option for encryption
- HMAC authentication in encrypt-then-authenticate order
- Packets cannot be replayed
- Works with iptables, firewalld, ipfw, and PF
- Packets can carry commands to execute on the target
Good fit for
- Hiding SSH from port scans
- Adding a layer ahead of unpatched services
- Replacing traditional port knocking
fwknop: questions and answers
- What is fwknop used for?
- fwknop implements Single Packet Authorization, hiding services such as SSH behind a default-drop firewall until a valid encrypted packet arrives. It is a good fit for hiding SSH from port scans, adding a layer ahead of unpatched services and replacing traditional port knocking.
- Is fwknop open source?
- Yes. fwknop is open source under the GPL-2.0 licence. Its source code is on GitHub at mrash/fwknop and is written mainly in Perl.
- Is fwknop free?
- Yes. fwknop is open source, so the software itself is free to use.
- Can I self-host fwknop?
- Yes. fwknop can be self-hosted on your own server or infrastructure.
- What are some alternatives to fwknop?
- Similar open-source tools in the Security category include fail2ban, step-ca and ModSecurity. SaaS products in the same category include Fortinet, SonicWall and Untangle NG Firewall.
- Is fwknop actively maintained?
- The most recent commit to fwknop was on 1 June 2026, and the latest release is 2.6.11, published on 7 February 2024. The project has 1.5k stars on GitHub, with 23 added in the last 30 days.
Open-source alternatives to fwknop
See all
fail2ban
Security
Daemon to ban hosts that cause multiple authentication errors
OSSvs DataDome★ 19k
step-ca
Security
🛡️ A private certificate authority (X.509 & SSH) & ACME server for secure automated certi
Apache-2.0vs Entrust★ 9.1k
ModSecurity
Security
ModSecurity is an open source, cross platform web application firewall (WAF) engine for Ap
Apache-2.0vs Cloudflare★ 9.9k
OPNsense
Security
OPNsense GUI, API and systems backend
BSD-2-Clausevs Fortinet★ 4.8k
pfSense
Security
Main repository for pfSense
Apache-2.0vs Fortinet★ 5.8k
OpenBao
Security
OpenBao is a software solution to manage, store, and distribute sensitive data including s
MPL-2.0vs AWS Secrets Manager★ 9k
SaaS alternatives to fwknop
See all
Fortinet
Security
FortiGate firewalls and a broad security fabric for network, cloud and endpoints
SaaS
SonicWall
Security
Network firewalls and security products for small and mid-sized businesses
SaaS
Untangle NG Firewall
Security
Network security platform that protects and connects entire networks
SaaS
Check Point
Security
Network firewalls, cloud and endpoint security from an Israeli security vendor
SaaS
Palo Alto Networks
Security
Network, cloud and endpoint security vendor selling firewalls, SASE and SOC tools
SaaS
Sophos
Security
Endpoint, firewall and managed detection and response services for businesses
SaaS
