fail2ban

PHP MySQL admin tools

Configuration to block IP addresses probing your web server for PHP-based database admin tools.

/etc/fail2ban/filter.d/phpmyadmin.conf:

# Fail2Ban configuration file
#
# Check Apache logs for attempts to access PHP admin tools
#

[Definition]

# Option: failregex
# Notes.: regex to match the 404'ed PMA file in the logfile. The
# host must be matched by a group named "host". The tag "" can
# be used for standard IP/hostname matching and is only an alias for
# (?:::f{4,6}:)?(?P\S+)
# Values: TEXT

Technology:

fail2ban

Fail2ban scans log files like /var/log/pwdfail or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address.

Installation
Download the source:

cd /extra/src
wget http://voxel.dl.sourceforge.net/project/fail2ban/fail2ban-stable/fail2ban-0.8.4/fail2ban-0.8.4.tar.bz2 
tar jxf fail2ban-0.8.4.tar.bz2
cd fail2ban-0.8.4

Run the installation script. fail2ban will be installed in /usr/share/fail2ban/ and /usr/bin/, configuration files will be in /etc/fail2ban:

./setup.py install

Automatic startup

Technology:

Subscribe to RSS - fail2ban

Recent Updates

Error | Production Monkeys

Error

The website encountered an unexpected error. Please try again later.

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/websites/dwadson.com/htdocs/drupal-7.32/includes/common.inc:2694) in drupal_send_headers() (line 1224 of /var/websites/dwadson.com/htdocs/drupal-7.32/includes/bootstrap.inc).
  • PDOException: SQLSTATE[HY000]: General error: 145 Table './productionmonkeys/watchdog' is marked as crashed and should be repaired: INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => cron [:db_insert_placeholder_2] => %type: !message in %function (line %line of %file). [:db_insert_placeholder_3] => a:6:{s:5:"%type";s:12:"PDOException";s:8:"!message";s:215:"SQLSTATE[HY000]: General error: 145 Table './productionmonkeys/watchdog' is marked as crashed and should be repaired: SELECT w.wid AS wid FROM {watchdog} w ORDER BY wid DESC LIMIT 1 OFFSET 999; Array ( ) ";s:9:"%function";s:12:"dblog_cron()";s:5:"%file";s:71:"/var/websites/dwadson.com/htdocs/drupal-7.32/modules/dblog/dblog.module";s:5:"%line";i:113;s:14:"severity_level";i:3;} [:db_insert_placeholder_4] => 3 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => http://www.productionmonkeys.net/category/technology/fail2ban [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => 192.168.0.104 [:db_insert_placeholder_9] => 1462450628 ) in dblog_watchdog() (line 160 of /var/websites/dwadson.com/htdocs/drupal-7.32/modules/dblog/dblog.module).