knockd.conf 327 B

123456789101112131415
  1. [options]
  2. UseSyslog
  3. [openSSH]
  4. sequence = 7000,8000,9000
  5. seq_timeout = 5
  6. command = /sbin/iptables -A INPUT -s %IP% -p tcp --dport 22 -j ACCEPT
  7. tcpflags = syn
  8. [closeSSH]
  9. sequence = 9000,8000,7000
  10. seq_timeout = 5
  11. command = /sbin/iptables -D INPUT -s %IP% -p tcp --dport 22 -j ACCEPT
  12. tcpflags = syn