IPTABLES: Blocking Entire IP Range

Doctor

Well-Known Member
Apr 26, 2003
180
0
166
How do I block this range of IP addresses using IPTABLES?

80.116.128.0 - 80.116.255.255

Anyone?

cPanel.net Support Ticket Number:
 

ciphervendor

Well-Known Member
Aug 26, 2002
1,052
0
166
iptables -I INPUT -s 80.116.0.0/16 -j DROP

cPanel.net Support Ticket Number:
 

Doctor

Well-Known Member
Apr 26, 2003
180
0
166
doctor:
How do I block this range of IP addresses using IPTABLES?
80.116.128.0 - 80.116.255.255
Anyone?

----------------------------

ciphervendor:
iptables -I INPUT -s 80.116.0.0/16 -j DROP
Thanks for the input. Does the 16 really cover 80.116.128.0 - 80.116.255.255 only OR 80.116.0.0 - 80.116.255.255 entirely?

If I put 80.116.0.0/32 instead, what range does it cover? Is it 80.116.0.0 - 80.116.0.255?

cPanel.net Support Ticket Number:
 

pagedeveloping

Well-Known Member
Jun 11, 2003
219
0
166
New York
These are the ranges:

222.222.222.1/24 == 222.222.222.*
222.222.222.1/16 == 222.222.*
222.222.222.1/8 == 222.*

cPanel.net Support Ticket Number:
 

ciphervendor

Well-Known Member
Aug 26, 2002
1,052
0
166
/32 is kind of useless as it only covers 1 ip address. /16 seems a little excessive, you may want to simply limit yourself to /24s

cPanel.net Support Ticket Number: