Well this firewall i use in begin start mi ot
SearzOnline.. and protected me long time.. is possible shutdown but this firewall are works and not all people can shutdown or lags your ot..
just only create 1 file name:
fw.sh in folder root
paste this:
now for active.. just only open putty
and use this commands:
remember you need make commands all times you make
reboot or shutdown -r now ,need put again all commands for active firewall.
Test this iptables are good.. protected ports and not all programs or udps ,ddos ,etc can shutdown.. is for all server have 1 protection not are big ,but works fine ^^
SearzOnline.. and protected me long time.. is possible shutdown but this firewall are works and not all people can shutdown or lags your ot..
just only create 1 file name:
fw.sh in folder root
paste this:
Lua:
#!/bin/bash
iptables -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW -m recent --set --name SSH --rsource
iptables -A INPUT -p tcp -m tcp --dport 80 -m state --state NEW -m recent --update --seconds 1 --hitcount 15 --rttl --name SSH --rsource -j DROP
iptables -A INPUT -p tcp -m tcp --dport 7171 -m state --state NEW -m recent --set --name SSH --rsource
iptables -A INPUT -p tcp -m tcp --dport 7171 -m state --state NEW -m recent --update --seconds 1 --hitcount 15 --rttl --name SSH --rsource -j DROP
iptables -A INPUT -p tcp -m tcp --dport 7172 -m state --state NEW -m recent --set --name SSH --rsource
iptables -A INPUT -p tcp -m tcp --dport 7172 -m state --state NEW -m recent --update --seconds 1 --hitcount 15 --rttl --name SSH --rsource -j DROP
now for active.. just only open putty
and use this commands:
Code:
cd /root
iptables -L
./fw.sh
remember you need make commands all times you make
reboot or shutdown -r now ,need put again all commands for active firewall.
Test this iptables are good.. protected ports and not all programs or udps ,ddos ,etc can shutdown.. is for all server have 1 protection not are big ,but works fine ^^