3 stage is work

This commit is contained in:
2024-10-23 03:18:58 +03:00
parent 65afb203f1
commit 76aef119bd
3 changed files with 53 additions and 5 deletions

21
scripts/knocking_setup.sh Executable file
View File

@@ -0,0 +1,21 @@
#!/bin/bash
echo -E "
[options]
Interface = eth1
[openNGINX]
sequence = 8100, 7200, 13000
seq_timeout = 5
command = /sbin/iptables -D INPUT -p tcp --dport 80 -j REJECT
tcpflags = syn
[closeNGINX]
sequence = 6300, 5200, 12001
seq_timeout = 5
command = /sbin/iptables -A INPUT -p tcp --dport 80 -j REJECT
tcpflags = syn
" > /etc/knockd.conf
/sbin/iptables -A INPUT -p tcp --dport 80 -j REJECT