knock-rs is a port-knocking implementation written in Rust.
Port-knocking lets a server keep services such as SSH hidden behind a firewall until a client sends the correct sequence of connection attempts to predefined closed ports.
The software detects SYN packets rather than listening on the protected ports. When a valid sequence is received, it can run a configured command, such as adding or removing an iptables rule for the client IP address.
This is free and open source software.
Key Features
- Includes a server daemon and command-line client.
- Detects SYN packets using raw packet capture.
- YAML-based configuration for server and client rules.
- Runs custom commands when a valid knock sequence is received.
- Supports dynamic firewall rules using client IP substitution.
- Useful for hiding SSH or other services from unauthorised access.
- Can open and close firewall ports on demand.
- Pre-built binaries are available.
- Can be run as a Docker container.
Website: github.com/TimothyYe/knock-rs
Support:
Developer: TimothyYe
License: Apache License 2.0
knock-rs is written in Rust. Learn Rust with our recommended free books and free tutorials.
Related Software
| Intrusion Prevention for SSH | |
|---|---|
| Fail2Ban | Intrusion prevention software framework written in Python |
| SSHGuard | Protects hosts from brute-force attacks against SSH and other services |
| denyhosts | Helps thwart SSH server attacks |
| iptables | Configure the Linux 2.4.x and later packet filtering ruleset |
| CSF | ConfigServer Security & Firewall |
| reaction | Daemon that scans program outputs for repeated patterns, and takes action |
Read our verdict in the software roundup.
Explore our comprehensive directory of recommended free and open source software. Our carefully curated collection spans every major software category.This directory is part of our ongoing series of informative articles for Linux enthusiasts. It features hundreds of detailed reviews, along with open source alternatives to proprietary solutions from major corporations such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk. You’ll also find interesting projects to try, hardware coverage, free programming books and tutorials, and much more. Discovered a useful open source Linux program that we haven’t covered yet? Let us know by completing this form. |

