LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   IP Table help, Droping entire 200 block of ip's? (https://www.linuxquestions.org/questions/linux-security-4/ip-table-help-droping-entire-200-block-of-ips-261999/)

Wide glide 12-02-2004 11:10 PM

IP Table help, Droping entire 200 block of ip's?
 
Hi All

I need a little help with iptables.
I want to block all of the Brazil ip addresses, I understand they are in the 200 block.

Is this the correct way to block the 200?
Code:

iptables -A INPUT -s 200.* -j DROP

Any help greatly appreciated :)

Capt_Caveman 12-02-2004 11:57 PM

No, iptables doesn't accept wildcards. Try using the CIDR nomenclature instead:

iptables -A INPUT -s 200.0.0.0/8 -j DROP

Wide glide 12-03-2004 12:39 AM

Thank you Sir :)


All times are GMT -5. The time now is 09:45 PM.