IP Filter

Introduction

IP Filter is a plugin for WordPress. It lets you grant or deny access to your website using a list of IP addresses.

Features

  • Filtered visitors will get a 403 Forbidden page.
  • Two filters available: “grant” (IP Filter IP list will act as a white list) and “deny” (it will act as a black list). The default filter type is “deny”
  • Wildcard character “*” allowed to filter a group of IPv4 addresses
  • Blocked IP addresses can be logged
  • The error message is customizable and can contain HTML
  • IP addresses to be filtered can be typed in a text zone. Here is a list of what you can put in this text zone:
    • Free format, you are not limited to put one IP address per line
    • Comments are allowed and will be ignored by IP Filter, but they should not contain IP addresses and the “*” character
    • IPv4 and IPv6 addresses are allowed
    • Wildcard character “*” is accepted for IPv4 but it must represent a complete field. IP addresses without wildcard can’t be truncated. Examples:
      • Correct: 10.20.30.40
      • Correct: 10.20.*.40
      • Correct: 10.*.*.*
      • Correct: 10.*
      • Correct: *.20
      • Correct: *
      • Incorrect: 10.2*
      • Incorrect: 10.20
      • Incorrect: 10.2*.30.40

Be careful to not block yourself!

 Screenshot

IP Filter settings page

Notes

If you happen to block yourself, remember that you still can access your administration area by typing the URL “/wp-admin/” after your domain name. Additionnally, you can also add the URL parameter “ipfilter_bypass” to bypass the filter (eg: “http://www.mysite.com/?ipfilter_bypass”).

Installation

The installation of IP Filter is very easy. Just extract the plugin directory into your wp-content/plugins directory, and add the IP addresses to filter in the IP Filter options page.

Get it!

Download IP Filter

View Comments (39)

  • I'm thinking about adding a text field in the options that would allow to optionnally load IP addresses from an external source. That would be an URL to a text-file for example.

  • A great feature to add would be automatic extraction of IPs from the Spam comments. A lot of the Wordpress sites I maintain we mark the comments as spam and keep them and not delete them. It would be great it there was a checkbox to turn on "Also get IPs from Spam Comments" and have it automatically pull those in on Save.

    • That will definitely be included in a future releasr as I got a need for that as well ;-)

  • I'm sorry if this is too elementary, but I had someone on my site that was filling out forms at an insanely fast rate and I want to block them-- this plugin looks perfect for the job, but how do I go about figuring out the ip address of the offender? I tried to use the google analytics filter, but in the filter area there is no way option to select "visitor ip address" as all of the tutorials say... and I am the admin. So what tools (or plugins) do you recommend for finding the offenders? Thanks!

  • This plugin looks like it is exactly what I need, but I want to allow users that are editors to be able to add IPs. Is there a way I can change the permissions to allow Editors to access the admin page of this plugin?

  • I have received numerous IP addresses from Ukraine posting unwanted adds and have been effectively using the filter as their IP addresses change, however one recent IP address seems to be unaffected by the filter as well as their post not showing up on reports normally emailed to me for moderation [5.248.80.184]. In an attempt to block 5.* I somehow blocked myself from the site and was forced to stay with the complete IP address.

    Any suggestions would be a great help. Thanks

  • Can I use this plug in to restrict access to certain pages on my website only? I want 90% of my site to be available to the public but for limited pages to be available to a limited number of IP addresses.

  • Love this plug-in, but at times it only works intermittently. Blocked IPs are still able to access the site. I have blocked over 1,000 IPs. Is this too many? Could this be causing the misses?

  • We are using the "Grant" filter and have just recently started using a web based proxy service. Is there a way to have the plugin detect a more accurate IP of the visitor instead of that of the proxy?

  • Hello. Is there anyway that IP Filter can allow a range of sequential ips from the same source without typing them all in?

1 2 3