how do i use iptables to block a large range of IPs from an ISP?
I want to block 184.108.40.206 - 220.127.116.11 from an ISP in Taiwan that is spamming my network via an old virus and causing my little IPCop to work much harder then it needs to.
I am talking several hundred hits per min from the same IP and when i dig deeper into my firewall logs it shows multiple computers from the same ISP hitting my network almost 24/7 for the past week or so.
now granted even if it did breach my firewall, it will do zero damage to my computer (im running OSx at the office and this is a MS virus) so that is not my concern. i just want to block that ISP and be done with them.
I know that if i use the following line i can block out a full range from 0 - 255, but how do i go past the first set of octects? (think that is the correct word for it)
# blocks HINET from Taipei Taiwan, CHTD, Chugnhwa Telecom Co., Ltd.
/sbin/iptables -A CUSTOMINPUT -s 18.104.22.168/24 -j DROP
but as you see above they have many more IP ranges, then just the 220.128.x.x that i just blocked with that single line. do i have to create a line for every 220.129, 220.130, etc... up to 220.143, or is there a faster, better way? many thanks.