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?

link|improve this question
feedback

1 Answer

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
link|improve this answer
Beat me by over a minute and no blue bar! – Shane Madden Jan 31 at 1:58
feedback

Your Answer

 
or
required, but never shown

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