• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Linux Basic IPTables (Protected all ports and stop attacks)

Cronox

www.Searz-Online.com
Joined
Jul 5, 2011
Messages
1,810
Reaction score
123
Location
Mexico
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:
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 ^^
 
./firewall.sh
iptables: Invalid argument. Run `dmesg' for more information.
iptables: Invalid argument. Run `dmesg' for more information.
iptables: Invalid argument. Run `dmesg' for more information.
 
Does it drop connections not 80 / 7171 /7172? or does limit connections / connection data. Dont understand it fully :D
 
bash: ./fw.sh: permiso denegado im like sudo what happens?
 
./fw.sh: línea 6511: 956365056-960196607: orden no encontrada


and now?



what this means?
 
Back
Top