Skip to content

Commit c12af94

Browse files
author
latham
committed
Fail2ban config start: Then the egg
1 parent 5eb43f4 commit c12af94

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

install/dist/lib/debian60.lib.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ public function configure_apache() {
105105
parent::configure_apache();
106106
}
107107

108+
public function configure_fail2ban() {
109+
copy('tpl/dovecot-pop3imap.conf.master',"/etc/fail2ban/filter.d/dovecot-pop3imap.conf");
110+
copy('tpl/dovecot_fail2ban_jail.local.master','/etc/fail2ban/jail.local');
111+
}
108112
}
109113

110-
?>
114+
?>

install/install.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@
200200
swriteln('Configuring Getmail');
201201
$inst->configure_getmail();
202202

203-
204203
//* Configure Pureftpd
205204
swriteln('Configuring Pureftpd');
206205
$inst->configure_pureftpd();
@@ -244,6 +243,11 @@
244243
swriteln('Configuring Ubuntu Firewall');
245244
$inst->configure_ufw_firewall();
246245
}
246+
247+
//* Configure Fail2ban
248+
if($conf['fail2ban']['installed'] == true) {
249+
swriteln('Configuring Fail2ban');
250+
$inst->configure_fail2ban();
247251

248252
if($conf['squid']['installed'] == true) {
249253
$conf['services']['proxy'] = true;
@@ -544,4 +548,4 @@
544548
echo "Installation completed.\n";
545549

546550

547-
?>
551+
?>

0 commit comments

Comments
 (0)