Ban IP Address and Range PDF Print E-mail
Joomla! 1.5 Products - Smaller Tools
Written by Sam Moffatt   
Thursday, 21 February 2008 04:19

Ban IP Address and Range is a small system plugin for Joomla! 1.5 that provides the ability to blacklist (block) IP addresses and ranges or whitelist (block all but those notated). Each entry is specified on its own line and ranges are specified using CIDR formatting (e.g. 192.168.1.0/24). Both administrator and site can be blocked or permitted using different lists or modes.

 

From version 1.5.3, the plugin has the ability to support comments in the params by prefixing the entries with a hash character (#) at the start of the line.

From version 1.5.2, the plugin has two modes of operation determined by the "Configuration Source" parameter. The first is the mode that uses the IP List for the Site and Administrator from the parameters configured in this screen. In the sample to the left this is the configuration offered. When table mode is selected the banip_entries table

From version 1.5.1, a "redirect location" can be set to send the user to a different location automatically.

In the sample to the left, the site is in blacklist only mode. This means that any access from the IP range listed (172.19.1.0/24) will be blocked with the message "Your IP address has been blocked".

The administrator is in whitelist only mode which means that the user has to come from the IP address 172.19.5.40 or the network 172.19.10/24.

 JDiagnostic provides a testing interface to validate IP address combinations prior to applying them enabling you to test if you will be locked out of your site.

 

Check it out and get the latest version from the extensions site >>>

 

Note: If you find that you are locked out of your site because of incorrect settings, renaming the /plugins/system/banip.php file to something else (e.g. banip.php.old) will disable this plugin and grant you access to your site again. Remember to rename it back to banip.php after you have fixed your settings to re-enable the plugin.

For the table mode, the following table is required:

CREATE TABLE `#__banip_entries` (
  `entry` varchar(30) NOT NULL,
  `type` INT NOT NULL,
  `client` INT NOT NULL,
  PRIMARY KEY (`entry`, `type`, `client`)
)
CHARACTER SET utf8
COMMENT = 'Ban IP Address/Range'; 
Last Updated on Tuesday, 06 July 2010 04:26