MODx - Banlist

From time to time we are all forced to prevent access for some bad intended visitors or spambots. A simple solution is to block them by IP. For MODx users, I have developed a module where you can manage a list of banned IP and email addresses. You also get a simple plugin that will prevent access to your homepage, alternatively to your manager, for visitors with banned IPs. It will redirect with a 401/Unauthorized header to your custom unauthorized page. So far, I have not altered the WebSignup snippet to prevent registration of users with banned email addresses.

Banlist module and the IP banning plugin were tested only on MODx 0.9.2, but I think they should work just fine on some older versions. For suggestions, improvement tips and questions, please feel free to use the banlist thread on the MODx support forums.

--DOWNLOAD COMMING BACK SOON--

How to install

  • Extract the archieve and make sure it has at least two PHP files.
  • Create a new module called "Banlist" and add content of banlist.module.php file to it.
  • Run module and click for installation. This will create two new database tables and a new field to the existing system settings table.
  • Enable banning and start adding IP and email addresses.
  • In case you do not have a custom unauthorized page, create a new one and activate it from the managers system configuration settings.
  • Create a new plugin called "IPbanning" and add content of banip.plugin.php file to it, select the "OnWebPageInit" system event.
  • The plugin will block access of visitor with banned IPs to the homepage, to also block access to the manager simply activate the "OnBeforeManagerLogin" and "OnManagerPageInit" system events. I suggest you do so!
  • Enjoy!

MODx - Banlist is licensed under the terms of the GPL License (GNU General Public 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.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Affiliation

  • PHP Link Directory
  • Cluj Blog Roll
v-beta-1