Table of Contents
glBan - Ban Plugin for glFusion
The Ban plugin allows you to ban people and bots from your website. You can ban a bot/user by any of several server variables. These are included by default:
- Remote IP Address
- Referer
- User Agent
- Script Name
You can add additional variables to check via the online configuration.
This plugin is based upon the work of Tom Willett and the Geeklog Ban Plugin. See the License below.
Requirements
- glFusion v1.1.4 or newer
Installation
The Ban Plugin uses the glFusion automated plugin installer. Simply upload the distribtuion using the glFusion plugin installer located in the Plugin Administration page.
The manual plugin installation method is also supported.
Upgrading
The upgrade process is identical to the installation process, simply upload the distribution from the Plugin Administration page.
There is currently no upgrade required or available.
Features
- The Ban plugin checks every page access against a list from your database of banned bots/users. If a match is found, the bot or user is presented with your choice of a blank page or a specific web page.
- Case insensitive regular expressions are used to give you great flexibility. The php eregi function is used to do the matches.
- You may add additional server variables to check. Anything which appears in PHP's $_SERVER array may be used.
Configuration Options
Configuration Options are set by the BAN section in the site Configuration area. There is no config.php required unless you wish to override any other settings.
| Option | Description |
|---|---|
| Enable Logging | Set this to “Yes” to have all banned requests logged. This is recommended to help troubleshooting if you end up banning requests inadvertently. You can view the log file through glFusion's built-in logfile viewer. |
| Redirect URL | (Optional) This is the URL that banned visitors will be redirected to. Do not specify a url within your glFusion site here! |
| Server Variables to Check | This is an array of $_SERVER variable names that will be checked. You can add or delete any of these names. |
Administration
The administration screen presents a list of variables and their corresponding values. Visitors will be banned if at least one of the variables is matched.
Adding a New Ban
To add a new condition, select the $_SERVER variable name from the dropdown list. Enter the value in the space provided and click “Add Ban”. There is currently no whitelist for the Ban plugin, so be sure that you don't ban yourself!
Remember that the data string is a Regex, so you'll need to escape certain characters properly.
You may click the link at the top of the administration menu to add sample data from the original Ban plugin.
Deleting a Ban
To delete one or more bans, click the checkboxes next to them and then click the trash can icon.
If you've inadvertently banned yourself from your site, you'll need to remove the offending record from the gl_ban table manually.
License
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
Copyright (C) 2009 by Lee Garner
Based on the Ban Plugin for Geeklog 1.3.8 Copyright (C) 2003 by Tom Willett