1FAIL2BAN-CLIENT(1)               User Commands              FAIL2BAN-CLIENT(1)
2
3
4

NAME

6       fail2ban-client - configure and control the server
7

SYNOPSIS

9       fail2ban-client [OPTIONS] <COMMAND>
10

DESCRIPTION

12       Fail2Ban  v0.8.2  reads  log file that contains password failure report
13       and bans the corresponding IP addresses using firewall rules.
14

OPTIONS

16       -c <DIR>
17              configuration directory
18
19       -s <FILE>
20              socket path
21
22       -d     dump configuration. For debugging
23
24       -i     interactive mode
25
26       -v     increase verbosity
27
28       -q     decrease verbosity
29
30       -x     force execution of the server (remove socket file)
31
32       -h, --help
33              display this help message
34
35       -V, --version
36              print the version
37

COMMAND

39              BASIC
40
41       start  starts the server and the jails
42
43       reload reloads the configuration
44
45       reload <JAIL>
46              reloads the jail <JAIL>
47
48       stop   stops all jails and terminate the server
49
50       status gets the current status of the server
51
52       ping   tests if the server is alive
53
54              LOGGING
55
56       set loglevel <LEVEL>
57              sets logging level to <LEVEL>. 0 is minimal, 4 is debug
58
59       get loglevel
60              gets the logging level
61
62       set logtarget <TARGET>
63              sets logging target to <TARGET>.  Can be STDOUT, STDERR,  SYSLOG
64              or a file
65
66       get logtarget
67              gets logging target
68
69              JAIL CONTROL
70
71       add <JAIL> <BACKEND>
72              creates <JAIL> using <BACKEND>
73
74       start <JAIL>
75              starts the jail <JAIL>
76
77       stop <JAIL>
78              stops the jail <JAIL>. The jail is removed
79
80       status <JAIL>
81              gets the current status of <JAIL>
82
83              JAIL CONFIGURATION
84
85       set <JAIL> idle on|off
86              sets the idle state of <JAIL>
87
88       set <JAIL> addignoreip <IP>
89              adds <IP> to the ignore list of <JAIL>
90
91       set <JAIL> delignoreip <IP>
92              removes <IP> from the ignore list of <JAIL>
93
94       set <JAIL> addlogpath <FILE>
95              adds <FILE> to the monitoring list of <JAIL>
96
97       set <JAIL> dellogpath <FILE>
98              removes <FILE> to the monitoring list of <JAIL>
99
100       set <JAIL> addfailregex <REGEX>
101              adds  the  regular  expression <REGEX> which must match failures
102              for <JAIL>
103
104       set <JAIL> delfailregex <INDEX>
105              removes the regular expression at <INDEX> for failregex
106
107       set <JAIL> addignoreregex <REGEX>
108              adds the regular expression <REGEX> which should  match  pattern
109              to exclude for <JAIL>
110
111       set <JAIL> delignoreregex <INDEX>
112              removes the regular expression at <INDEX> for ignoreregex
113
114       set <JAIL> findtime <TIME>
115              sets the number of seconds <TIME> for which the filter will look
116              back for <JAIL>
117
118       set <JAIL> bantime <TIME>
119              sets the number of seconds <TIME> a  host  will  be  banned  for
120              <JAIL>
121
122       set <JAIL> maxretry <RETRY>
123              sets  the number of failures <RETRY> before banning the host for
124              <JAIL>
125
126       set <JAIL> addaction <ACT>
127              adds a new action named <NAME> for <JAIL>
128
129       set <JAIL> delaction <ACT>
130              removes the action <NAME> from <JAIL>
131
132       set <JAIL> setcinfo <ACT> <KEY> <VALUE>
133              sets <VALUE> for <KEY> of the action <NAME> for <JAIL>
134
135       set <JAIL> delcinfo <ACT> <KEY>
136              removes <KEY> for the action <NAME> for <JAIL>
137
138       set <JAIL> actionstart <ACT> <CMD>
139              sets the start command <CMD> of the action <ACT> for <JAIL>
140
141       set <JAIL> actionstop <ACT> <CMD>
142              sets the stop command <CMD> of the action <ACT> for <JAIL>
143
144       set <JAIL> actioncheck <ACT> <CMD>
145              sets the check command <CMD> of the action <ACT> for <JAIL>
146
147       set <JAIL> actionban <ACT> <CMD>
148              sets the ban command <CMD> of the action <ACT> for <JAIL>
149
150       set <JAIL> actionunban <ACT> <CMD>
151              sets the unban command <CMD> of the action <ACT> for <JAIL>
152
153              JAIL INFORMATION
154
155       get <JAIL> logpath
156              gets the list of the monitored files for <JAIL>
157
158       get <JAIL> ignoreip
159              gets the list of ignored IP addresses for <JAIL>
160
161       get <JAIL> timeregex
162              gets the regular expression used  for  the  time  detection  for
163              <JAIL>
164
165       get <JAIL> timepattern
166              gets the pattern used for the time detection for <JAIL>
167
168       get <JAIL> failregex
169              gets  the list of regular expressions which matches the failures
170              for <JAIL>
171
172       get <JAIL> ignoreregex
173              gets the list of regular expressions which matches  patterns  to
174              ignore for <JAIL>
175
176       get <JAIL> findtime
177              gets  the  time for which the filter will look back for failures
178              for <JAIL>
179
180       get <JAIL> bantime
181              gets the time a host is banned for <JAIL>
182
183       get <JAIL> maxretry
184              gets the number of failures allowed for <JAIL>
185
186       get <JAIL> addaction
187              gets the last action which has been added for <JAIL>
188
189       get <JAIL> actionstart <ACT>
190              gets the start command for the action <ACT> for <JAIL>
191
192       get <JAIL> actionstop <ACT>
193              gets the stop command for the action <ACT> for <JAIL>
194
195       get <JAIL> actioncheck <ACT>
196              gets the check command for the action <ACT> for <JAIL>
197
198       get <JAIL> actionban <ACT>
199              gets the ban command for the action <ACT> for <JAIL>
200
201       get <JAIL> actionunban <ACT>
202              gets the unban command for the action <ACT> for <JAIL>
203

FILES

205       /etc/fail2ban/*
206

AUTHOR

208       Written by Cyril Jaquier <cyril.jaquier@fail2ban.org>.  Many  contribu‐
209       tions by Yaroslav O. Halchenko <debian@onerussian.com>.
210

REPORTING BUGS

212       Report bugs to <cyril.jaquier@fail2ban.org>
213
215       Copyright © 2004-2008 Cyril Jaquier
216       Copyright  of modifications held by their respective authors.  Licensed
217       under the GNU General Public License v2 (GPL).
218

SEE ALSO

220       fail2ban-server(1)
221
222
223
224fail2ban-client v0.8.2            March 2008                FAIL2BAN-CLIENT(1)
Impressum