~lazypower/charms/trusty/fail2ban/trunk

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Fail2Ban

Deploys fail2ban monitoring and denial-of-service (DoS) prevention service,
with exposed configuration to help prevent SSH DoS attacks.

The fail2ban service scans log files and bans IPs that have too many password
failures.  The number of failures, and ban time are configurable.

# Deployment

The fail2ban charm is a subordinate charm a container to deploy.
The fail2ban charm uses the implicit juju-info relationship so it can be
related to any container charm.  Here are the steps to deploy the charm:

    juju deploy ubuntu
    juju deploy fail2ban
    juju add-relation fail2ban:juju-info ubuntu:juju-info

These steps will install, and configure fail2ban to monitor SSH by default
with a 1 hour delay on incorrect password attempts, after 3 failed attempts.

## Known Limitations and Issues

This charm does not configure any of the other services fail2ban can monitor,
such as http, ftp, etc.  If you wish to configure these services you can find
the configuration file at `/etc/fail2ban/jail.local`.

# Configuration

- **maxretry**: number of attempts before banning the IP adddress.
- **ignoreip**: Additional IP's (space separated) to add to the ignore ruleset.
Supports IP and CIDR.
- **bantime**: Ban time in seconds (defaults to 1 hour).
- **destemail**: Email address to send mail to on abuse.

Example configuration

    juju set fail2ban bantime=3000 maxretry=5 ignoreip=192.262.3.0/24

## Maintainer

- [Charles Butler <charles.butler@ubuntu.com>](mailto:charles.butler@ubuntu.com)

## Fail2ban upstream project

- [Fail2ban Website](http://www.fail2ban.org/wiki/index.php/Main_Page)
- [Fail2ban issues](https://github.com/fail2ban/fail2ban/issues)