How To Ban An IP Address

In: Howtos

19 Jan 2010

Stop!Within a few days of starting this blog, I found the content being scrapped to another domain. The speed at which these sites are setup are astonishing. You can spend hours writing and posting articles and it’ll be ripped within minutes. There are a few options that you can take to minimize such thefts.

Since this is more of a hosting blog, I’ll focus on banning an IP address. There are few ways to do it. First of all, you have to identify the IP address. Be very careful about this. If you ban your own IP will not be able to login to undo it! Or sometimes a client could be using a service or software to monitor your site. Don’t be too quick to identify it as a ‘hack attempt’… In my case, I’m sure of the site scrapping my content. I ping-ed the site and also cross-checked with the logs to confirm the offending IP.

If you’re running IP tables, you can SSH in and run the following:

iptables -A INPUT -s -j DROP

The other alternative is to block and IP in Plesk (I’m using Plesk 9.x)

  1. Login as ‘admin’.
  2. Go to Settings > Manage Firewall Rules
  3. Click on Edit Firewall Configuration
  4. Click on Add Custom Rule
  5. Give the rule a name and change the settings as per the image below:

How To Ban An IP With Plesk

Its even easier in cPanel. When you login, look under the “Security” grouping and locate the “IP Deny Manager” icon. In the next window just add your IP and submit. Can’t go wrong with that! Just be careful not to enter ‘wildcard’ IPs like 202.*.*.* which means all IPs starting with 202 will be blocked.

So, there you go. A simple tutorial that will save you time (and bandwidth is someone is hotlinking your images or videos). Please leave a comment below if you have other favorite techniques or tips that you’d like to share.

Comment Form

About VPS Guides

I've been using Virtual Private Servers for the past 11 years. I'd like to share these experiences here, so I'll be writing Tips, Tutorials, Guides and other helpful hints...

» VPS Hosting Comparison Chart «

  • admin: Haha... yes. I think I might have published this one a little too early, I've been compiling but hav [...]
  • unmetered vps: So uhm.. where is the comparison? [...]
  • tayfun: thanks for the hint. I have been searching this dns stuff and i was about to get crazy :) [...]
  • Infrenion: Nice post, I would recommend using WHMCS Billing system (http://www.whmcs.com) and Vision Helpdesk S [...]
  • michael: Thanks. This helped me. You know how frustrating these simple things can be!! [...]
DNS Made Easy

Partner Sites