This plugin hasn’t been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.

IP Filter

Description

Grants or denies access to a list of IP addresses.

Unauthorized IP addresses will get a 403 Forbidden HTTP header.

The error message is customizable and can contain HTML.

Blocked IP addresses can be logged.

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 about the following points:

  1. If you choose the “deny” filter type and you add your IP to the deny list, you will loose access to your website
  2. If you choose the “grant” filter type and you do not add your IP to the list, you will loose access to your website
  3. If you add the “*” filter, nobody will be able to access to your website

This plugin requires PHP 5 and WordPress 3.x

Screenshots

  • IP Filter settings in WordPress administration area

FAQ

I blocked myself! What can I do?
  • In case you did the mistake to block yourself from your blog, you still can get access your administration panel by going to the “/wp-admin/” URL
  • Additionnally, the filter can be bypassed by adding the “ipfilter_bypass” parameter to the URL (eg: http://www.myblog.com/?ipfilter_bypass)
Can I put some HTML into the custom message?

Yes. But why bother if you just want to block those annoying visitors? You’d better save bandwidth.

Can I add IP ranges instead of complete IP addresses?

You can use the wildcard character “*”. It is planned to add a mode that use regular expressions, but without any ETA.

Why isn’t IP Filter translated in my language?

Most probably because nobody submitted a translation for your language yet. But you can help.
Read our guide for plugins translators at http://www.gabsoftware.com/tips/a-guide-for-wordpress-plugins-translators-gettext-poedit-locale/

Changelog

1.0.3

  • The message shown to filtered visitors can now include HTML code
  • The message shown to filtered visitors can now contain HTML special characters such as quotes, double quotes, etc.
  • The bypass URL parameter can be customized and disabled as well
  • Now use wp_die instead of die

1.0.2

  • Added possibility to use the wildcard character “*”
  • It is now possible to purge the log file in the settings page
  • Code cleaning and simplification
  • Added a zone that displays the IP addresses extracted from your input

1.0.1

  • Added log options

1.0.0

  • Initial release

Contributors & Developers

This is open source software. The following people have contributed to this plugin.

Contributors

Browse the code