blob: 46c909c4679cf96da96e653ddb9cedd056a58123 (
plain) (
blame)
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
48
49
50
51
52
53
54
|
<!DOCTYPEhtml>
<htmldir="ltr" lang="en">
<head>
<meta charset='utf-8'>
<title>Fail2ban</title>
</head>
<body>
<a href="index.html">Tools Index</a>
<h1>Fail2ban</h1>
<pre>
$ prt-get depinst fail2ban
</pre>
<h2 id="conf">1. Configure</h2>
<p>To start fail2ban at next boot edit /etc/rc.conf and add fail2ban.
Fail2ban will verify if /etc/fail2ban/jail.local exist, if exist will
use it. Copy distribution jail.conf to jail.locol;</p>
<pre>
$ sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local
</pre>
<p>Edit /etc/fail2ban/jail.local, example configuration;</p>
<pre>
[ssh-iptables]
enabled = enable
filter = sshd
action = iptables[name=SSH, port=ssh, protocol=tcp]
sendmail-whois[name=SSH, dest=admin@box, sender=fail2ban@box, sendername="fail2ban"]
logpath = /var/log/auth
maxretry = 5
</pre>
<p>Test a filter</p>
<pre>
# fail2ban-regex /var/log/iptables iptables-ssh.conf
</pre>
<a href="index.html">Tools Index</a>
<p>
This is part of the Hive System Documentation.
Copyright (C) 2018
c9 team.
See the file <a href="../fdl-1.3-standalone.html">Gnu Free Documentation License</a> for copying conditions.</p>
</body>
</html>
|