@@ -23,10 +23,10 @@ function fuNFQCHECK {
2323myNFQCHECK=$( grep -e ' ^\s*honeytrap:\|^\s*glutton:' $myDOCKERCOMPOSEYML | tr -d ' : ' | uniq)
2424if [ " $myNFQCHECK " == " " ];
2525 then
26- echo " No NFQ related honeypot detected, no iptables rules needed. Exiting."
26+ echo " No NFQ related honeypot detected, no iptables-legacy rules needed. Exiting."
2727 exit
2828 else
29- echo " Detected $myNFQCHECK as NFQ based honeypot, iptables rules needed. Continuing."
29+ echo " Detected $myNFQCHECK as NFQ based honeypot, iptables-legacy rules needed. Continuing."
3030fi
3131}
3232
@@ -41,54 +41,54 @@ echo "$myRULESPORTS"
4141}
4242
4343function fuSETRULES {
44- # ## Setting up iptables rules for honeytrap
44+ # ## Setting up iptables-legacy rules for honeytrap
4545if [ " $myNFQCHECK " == " honeytrap" ];
4646 then
47- /sbin/iptables -w -A INPUT -s 127.0.0.1 -j ACCEPT
48- /sbin/iptables -w -A INPUT -d 127.0.0.1 -j ACCEPT
47+ /usr/ sbin/iptables-legacy -w -A INPUT -s 127.0.0.1 -j ACCEPT
48+ /usr/ sbin/iptables-legacy -w -A INPUT -d 127.0.0.1 -j ACCEPT
4949
5050 for myPORT in $myRULESPORTS ; do
51- /sbin/iptables -w -A INPUT -p tcp --dport $myPORT -j ACCEPT
51+ /usr/ sbin/iptables-legacy -w -A INPUT -p tcp --dport $myPORT -j ACCEPT
5252 done
5353
54- /sbin/iptables -w -A INPUT -p tcp --syn -m state --state NEW -j NFQUEUE
54+ /usr/ sbin/iptables-legacy -w -A INPUT -p tcp --syn -m state --state NEW -j NFQUEUE
5555fi
5656
57- # ## Setting up iptables rules for glutton
57+ # ## Setting up iptables-legacy rules for glutton
5858if [ " $myNFQCHECK " == " glutton" ];
5959 then
60- /sbin/iptables -w -t raw -A PREROUTING -s 127.0.0.1 -j ACCEPT
61- /sbin/iptables -w -t raw -A PREROUTING -d 127.0.0.1 -j ACCEPT
60+ /usr/ sbin/iptables-legacy -w -t raw -A PREROUTING -s 127.0.0.1 -j ACCEPT
61+ /usr/ sbin/iptables-legacy -w -t raw -A PREROUTING -d 127.0.0.1 -j ACCEPT
6262
6363 for myPORT in $myRULESPORTS ; do
64- /sbin/iptables -w -t raw -A PREROUTING -p tcp --dport $myPORT -j ACCEPT
64+ /usr/ sbin/iptables-legacy -w -t raw -A PREROUTING -p tcp --dport $myPORT -j ACCEPT
6565 done
6666 # No need for NFQ forwarding, such rules are set up by glutton
6767fi
6868}
6969
7070function fuUNSETRULES {
71- # ## Removing iptables rules for honeytrap
71+ # ## Removing iptables-legacy rules for honeytrap
7272if [ " $myNFQCHECK " == " honeytrap" ];
7373 then
74- /sbin/iptables -w -D INPUT -s 127.0.0.1 -j ACCEPT
75- /sbin/iptables -w -D INPUT -d 127.0.0.1 -j ACCEPT
74+ /usr/ sbin/iptables-legacy -w -D INPUT -s 127.0.0.1 -j ACCEPT
75+ /usr/ sbin/iptables-legacy -w -D INPUT -d 127.0.0.1 -j ACCEPT
7676
7777 for myPORT in $myRULESPORTS ; do
78- /sbin/iptables -w -D INPUT -p tcp --dport $myPORT -j ACCEPT
78+ /usr/ sbin/iptables-legacy -w -D INPUT -p tcp --dport $myPORT -j ACCEPT
7979 done
8080
81- /sbin/iptables -w -D INPUT -p tcp --syn -m state --state NEW -j NFQUEUE
81+ /usr/ sbin/iptables-legacy -w -D INPUT -p tcp --syn -m state --state NEW -j NFQUEUE
8282fi
8383
84- # ## Removing iptables rules for glutton
84+ # ## Removing iptables-legacy rules for glutton
8585if [ " $myNFQCHECK " == " glutton" ];
8686 then
87- /sbin/iptables -w -t raw -D PREROUTING -s 127.0.0.1 -j ACCEPT
88- /sbin/iptables -w -t raw -D PREROUTING -d 127.0.0.1 -j ACCEPT
87+ /usr/ sbin/iptables-legacy -w -t raw -D PREROUTING -s 127.0.0.1 -j ACCEPT
88+ /usr/ sbin/iptables-legacy -w -t raw -D PREROUTING -d 127.0.0.1 -j ACCEPT
8989
9090 for myPORT in $myRULESPORTS ; do
91- /sbin/iptables -w -t raw -D PREROUTING -p tcp --dport $myPORT -j ACCEPT
91+ /usr/ sbin/iptables-legacy -w -t raw -D PREROUTING -p tcp --dport $myPORT -j ACCEPT
9292 done
9393 # No need for removing NFQ forwarding, such rules are removed by glutton
9494fi
0 commit comments