-
-
Save bloatfan/b68b35aaf76a4d01b579e0718242c57c to your computer and use it in GitHub Desktop.
Revisions
-
bloatfan renamed this gist
May 26, 2021 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
vdw revised this gist
Jan 25, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -14,6 +14,9 @@ Block brute forcing - iptables rules ``` iptables -L -n iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --set iptables -I INPUT -p tcp --dport 22 -i eth0 -m state --state NEW -m recent --update --seconds 600 --hitcount 3 -j DROP iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name ssh --rsource iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent ! --rcheck --seconds 600 --hitcount 3 --name ssh --rsource -j ACCEPT -
vdw revised this gist
Jan 22, 2015 . 1 changed file with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -8,4 +8,15 @@ Block with ip tables ```iptables -A INPUT -s IP-ADDRESS -j DROP``` Kill connection ```tcpkill -i eth0 -9 port 50185``` Block brute forcing - iptables rules ``` iptables -L -n iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent --set --name ssh --rsource iptables -A INPUT -p tcp --dport 22 -m state --state NEW -m recent ! --rcheck --seconds 600 --hitcount 3 --name ssh --rsource -j ACCEPT service iptables save service iptables restart ``` -
vdw revised this gist
Jan 22, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ Install tcpkill ```yum -y install dsniff --enablerepo=epel``` View connections ```netstat -tnpa | grep ESTABLISHED.*sshd.``` Block with ip tables -
vdw revised this gist
Jan 22, 2015 . 1 changed file with 3 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,9 @@ Install tcpkill ```yum -y install dsniff --enablerepo=epel``` View connections ```netstat -tnpa | grep ESTABLISHED.*sshd.``` Block with ip tables ```iptables -A INPUT -s IP-ADDRESS -j DROP``` -
vdw revised this gist
Jan 22, 2015 . No changes.There are no files selected for viewing
-
vdw revised this gist
Jan 22, 2015 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ Install tcpkill ```yum -y install dsniff --enablerepo=epel``` Block with ip tables ```iptables -A INPUT -s IP-ADDRESS -j DROP``` Kill connection ```tcpkill -i eth0 -9 port 50185``` -
vdw created this gist
Jan 22, 2015 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,8 @@ Install tcpkill ```yum -y install dsniff --enablerepo=epel``` Block with ip tables ```iptables -A INPUT -s IP-ADDRESS -j DROP``` Kill connection ```tcpkill -i eth0 -9 port 50185```