Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a case where I want to ban specific IP address on my VPS. To ban the IP's I use SSH Access with this code:

iptables -I INPUT -s my-ip-here -j DROP

The case wich I want to ban is as following. Ex:

I have an IP address in following format 84.252.55.106 i.e. The first three octets are always same 84.252.55 and only the last octet changes everytime when I got the spammer.

Can I ban 84.252.55 and how will it reflect on the server?

share|improve this question

1 Answer 1

sure, you just want to write out your rule with a subnet mask. So it would look like:

iptables -I INPUT -s 84.252.55.0/24 -j DROP
share|improve this answer
    
Beat me by over a minute and no blue bar! –  Shane Madden Jan 31 '12 at 1:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.