Skip to content

Instantly share code, notes, and snippets.

@grammy-jiang
Last active March 8, 2020 05:06
Show Gist options
  • Save grammy-jiang/be984e674ea557a2c124b46eb1f342a0 to your computer and use it in GitHub Desktop.
Save grammy-jiang/be984e674ea557a2c124b46eb1f342a0 to your computer and use it in GitHub Desktop.
/etc/knockd.conf on Raspberry Pi, refer to https://linux.die.net/man/1/knockd
[options]
UseSyslog
[opencloseSSH]
sequence = 7000,8000,9000
seq_timeout = 5
tcpflags = syn
start_command = /usr/bin/firewall-cmd --zone=public --add-service=ssh
cmd_timeout = 10
stop_command = /usr/bin/firewall-cmd --zone=public --remove-service=ssh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment