unlcms / UNL-CMS

Drupal 7 implementation at the University of Nebraska–Lincoln
http://unlcms.unl.edu/
GNU General Public License v2.0
4 stars 13 forks source link

Deploy Autoban for every site #939

Closed ericras closed 5 years ago

ericras commented 6 years ago
ericras commented 6 years ago

Settings added to sites/all/settings.php

// Autoban settings to force on all sites.
$conf['autoban_cron_enable'] = FALSE;
$conf['autoban_dblog_type_exclude'] = "autoban,cron,php,system,user";
$conf['autoban_force_enable'] = TRUE;
$conf['autoban_thresholds'] = "1,2,3,5,10,20,50,100,200,500,1000";
$conf['autoban_whitelist'] = "10.0.0.0/8\r\n129.93.0.0/16";
tsteiner commented 6 years ago

sed script to add the shared tables to the settings.php file (and not duplicate it if it already exists):

/'default'\s*=> '\w*_drupal_',/,/^);$/ {
  /'autoban'/ d
  /'blocked_ips'/ d
  /'filter'/ {
    i \  'autoban'          => 'drupal_',
    i \  'blocked_ips'      => 'drupal_',
  }
}
ericras commented 6 years ago

No longer going to share tables