Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 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

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

iptables -I INPUT -s -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


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.