LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

knockd

server component of port knocking

TLDR

Start knockd as a daemon
$ knockd -d
copy
Use a specific configuration file
$ knockd -c [path/to/knockd.conf]
copy

SYNOPSIS

knockd [options]

DESCRIPTION

knockd is the server component of port knocking. It listens for specific sequences of connection attempts and executes commands when a valid sequence is detected.Configuration in /etc/knockd.conf defines sequences and corresponding commands. Typical use cases include opening firewall ports for SSH access after receiving the correct knock sequence.Example configuration opens SSH:

$ [openSSH]
sequence = 7000,8000,9000
command = /sbin/iptables -A INPUT -s %IP% -p tcp --dport 22 -j ACCEPT
copy

PARAMETERS

-d, --daemon

Run as a daemon in the background
-c, --config FILE
Use specified configuration file
-i, --interface IF
Network interface to listen on
-D, --debug
Output debug messages
-l, --lookup
Lookup DNS names for log entries

INSTALL

sudo apt install knockd
copy
sudo dnf install knock
copy
sudo pacman -S knockd
copy
sudo apk add knock
copy
sudo zypper install knockd
copy
brew install knock
copy
nix profile install nixpkgs#knock
copy

CAVEATS

Sequences can potentially be sniffed if not using encrypted protocols. Single-packet authentication (SPA) tools like fwknop may be more secure. Configuration must be protected from unauthorized access.

HISTORY

Port knocking was introduced as a security-through-obscurity technique in the early 2000s. knockd remains one of the most popular implementations, though more advanced techniques like SPA have emerged.

SEE ALSO

knock(1), iptables(8)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid