great rc.firewall of China
Just about every night now, PortSentry informs me that someone from some IP in China and/or India is attempting to fondle my system, for example:
Code:
**Unmached entries** 3 Time(s): attackalert: Connect from host: 61.174.142.124/61.174.142.124 to TCP port: 1 6 Time(s): attackalert: Connect from host: 61.54.16.6/61.54.16.6 to TCP port: 111 8 Time(s): attackalert: Connect from host: 61.11.56.12/61.11.56.12 to TCP port: 111
So let's say I want to block ALL traffic from 61.174.0.0 - 61.174.7.255 (Zhejiang Telecom)? I know I can modify /etc/hosts.deny with the entry ALL:61.174. but I don't even want a ping from these guys.
So here is the killer question, is the correct IPTables syntax:
Code:
/sbin/iptables -I INPUT -s 61.174.0.0/255.0.0.0 -j DROP
Code:
/sbin/iptables -I INPUT -s 61.174.0.0/8 -j DROP