1 ############ THESE SETTINGS ARE REQUIRED ############
3 ########################################################################
5 # SECURE_LOG: the log file that contains sshd logging info
6 # if you are not sure, grep "sshd:" /var/log/*
8 # The file to process can be overridden with the --file command line
12 #SECURE_LOG = /var/log/secure
14 # Mandrake or FreeBSD:
15 #SECURE_LOG = /var/log/auth.log
18 #SECURE_LOG = /var/log/messages
20 ########################################################################
23 SECURE_LOG = /var/log/messages
25 ########################################################################
26 # HOSTS_DENY: the file which contains restricted host access information
28 # Most operating systems:
29 #HOSTS_DENY = /etc/hosts.deny
31 # Some BSD (FreeBSD) Unixes:
32 #HOSTS_DENY = /etc/hosts.allow
34 # Another possibility (also see the next option):
35 #HOSTS_DENY = /etc/hosts.evil
36 #######################################################################
39 HOSTS_DENY = /opt/etc/hosts.deny
41 ########################################################################
42 # PURGE_DENY: removed HOSTS_DENY entries that are older than this time
43 # when DenyHosts is invoked with the --purge flag
46 # Where 'i' is an integer (eg. 7)
56 # purge entries older than 1 week
59 # purge entries older than 5 days
61 #######################################################################
64 #######################################################################
65 # BLOCK_SERVICE: the service name that should be blocked in HOSTS_DENY
67 # man 5 host_access for details
69 # eg. sshd: 127.0.0.1 # will block sshd logins from 127.0.0.1
71 # To block all services for the offending host:
75 # To only record the offending host and nothing else (if using
76 # an auxilary file to list the hosts). Refer to:
77 # http://denyhosts.sourceforge.net/faq.html#aux
80 #######################################################################
83 #######################################################################
85 # DENY_THRESHOLD_INVALID: block each host after the number of failed login
86 # attempts has exceeded this value. This value applies to invalid
87 # user login attempts (eg. non-existent user accounts)
89 DENY_THRESHOLD_INVALID = 5
91 #######################################################################
93 #######################################################################
95 # DENY_THRESHOLD_VALID: block each host after the number of failed
96 # login attempts has exceeded this value. This value applies to valid
97 # user login attempts (eg. user accounts that exist in /etc/passwd) except
100 DENY_THRESHOLD_VALID = 10
102 #######################################################################
104 #######################################################################
106 # DENY_THRESHOLD_ROOT: block each host after the number of failed
107 # login attempts has exceeded this value. This value applies to
108 # "root" user login attempts only.
110 DENY_THRESHOLD_ROOT = 1
112 #######################################################################
115 #######################################################################
117 # WORK_DIR: the path that DenyHosts will use for writing data to
118 # (it will be created if it does not already exist).
120 # Note: when run in daemon mode, this directory should be specified
121 # as an absolute path name (eg. /home/foo/denyhosts/data)
123 WORK_DIR = /opt/share/denyhosts/data
125 #######################################################################
127 #######################################################################
129 # SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS
131 # SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES|NO
132 # If set to YES, if a suspicious login attempt results from an allowed-host
133 # then it is considered suspicious. If this is NO, then suspicious logins
134 # from allowed-hosts will not be reported. All suspicious logins from
135 # ip addresses that are not in allowed-hosts will always be reported.
137 SUSPICIOUS_LOGIN_REPORT_ALLOWED_HOSTS=YES
138 ######################################################################
140 ######################################################################
144 # HOSTNAME_LOOKUP=YES|NO
145 # If set to YES, for each IP address that is reported by Denyhosts,
146 # the corresponding hostname will be looked up and reported as well
151 ######################################################################
154 ######################################################################
158 # LOCK_FILE=/path/denyhosts
159 # If this file exists when DenyHosts is run, then DenyHosts will exit
160 # immediately. Otherwise, this file will be created upon invocation
161 # and deleted upon exit. This ensures that only one instance is
165 #LOCK_FILE = /var/lock/subsys/denyhosts
168 #LOCK_FILE = /var/run/denyhosts.pid
171 #LOCK_FILE = /tmp/denyhosts.lock
173 ######################################################################
176 LOCK_FILE = /var/run/denyhosts.pid
179 ############ THESE SETTINGS ARE OPTIONAL ############
182 #######################################################################
184 # ADMIN_EMAIL: if you would like to receive emails regarding newly
185 # restricted hosts and suspicious logins, set this address to
186 # match your email address. If you do not want to receive these reports
187 # leave this field blank (or run with the --noemail option)
191 #######################################################################
193 #######################################################################
195 SMTP_HOST = localhost
197 SMTP_FROM = DenyHosts <nobody@localhost>
198 SMTP_SUBJECT = DenyHosts Report
202 #######################################################################
204 ######################################################################
206 # ALLOWED_HOSTS_HOSTNAME_LOOKUP
208 # ALLOWED_HOSTS_HOSTNAME_LOOKUP=YES|NO
209 # If set to YES, for each entry in the WORK_DIR/allowed-hosts file,
210 # the hostname will be looked up. If your versions of tcp_wrappers
211 # and sshd sometimes log hostnames in addition to ip addresses
212 # then you may wish to specify this option.
214 #ALLOWED_HOSTS_HOSTNAME_LOOKUP=NO
216 ######################################################################
218 ######################################################################
220 # AGE_RESET_VALID: Specifies the period of time between failed login
221 # attempts that, when exceeded will result in the failed count for
222 # this host to be reset to 0. This value applies to login attempts
223 # to all valid users (those within /etc/passwd) with the
224 # exception of root. If not defined, this count will never
227 # See the comments in the PURGE_DENY section (above)
228 # for details on specifying this value or for complete details
229 # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
233 ######################################################################
235 ######################################################################
237 # AGE_RESET_ROOT: Specifies the period of time between failed login
238 # attempts that, when exceeded will result in the failed count for
239 # this host to be reset to 0. This value applies to all login
240 # attempts to the "root" user account. If not defined,
241 # this count will never be reset.
243 # See the comments in the PURGE_DENY section (above)
244 # for details on specifying this value or for complete details
245 # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
249 ######################################################################
251 ######################################################################
253 # AGE_RESET_INVALID: Specifies the period of time between failed login
254 # attempts that, when exceeded will result in the failed count for
255 # this host to be reset to 0. This value applies to login attempts
256 # made to any invalid username (those that do not appear
257 # in /etc/passwd). If not defined, count will never be reset.
259 # See the comments in the PURGE_DENY section (above)
260 # for details on specifying this value or for complete details
261 # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
263 AGE_RESET_INVALID=10d
265 ######################################################################
267 ######################################################################
269 # PLUGIN_DENY: If set, this value should point to an executable
270 # program that will be invoked when a host is added to the
271 # HOSTS_DENY file. This executable will be passed the host
272 # that will be added as it's only argument.
274 #PLUGIN_DENY=/usr/bin/true
276 ######################################################################
279 ######################################################################
281 # PLUGIN_PURGE: If set, this value should point to an executable
282 # program that will be invoked when a host is removed from the
283 # HOSTS_DENY file. This executable will be passed the host
284 # that is to be purged as it's only argument.
286 #PLUGIN_PURGE=/usr/bin/true
288 ######################################################################
291 ######### THESE SETTINGS ARE SPECIFIC TO DAEMON MODE ##########
294 #######################################################################
296 # DAEMON_LOG: when DenyHosts is run in daemon mode (--daemon flag)
297 # this is the logfile that DenyHosts uses to report it's status.
298 # To disable logging, leave blank. (default is: /var/log/denyhosts)
300 DAEMON_LOG = /opt/var/log/denyhosts.log
305 ######################################################################
307 #######################################################################
309 # DAEMON_LOG_TIME_FORMAT: when DenyHosts is run in daemon mode
310 # (--daemon flag) this specifies the timestamp format of
311 # the DAEMON_LOG messages (default is the ISO8061 format:
312 # ie. 2005-07-22 10:38:01,745)
314 # for possible values for this parameter refer to: man strftime
317 #DAEMON_LOG_TIME_FORMAT = %b %d %H:%M:%S
320 #DAEMON_LOG_TIME_FORMAT = %b %d %I:%M:%S
322 ######################################################################
324 #######################################################################
326 # DAEMON_SLEEP: when DenyHosts is run in daemon mode (--daemon flag)
327 # this is the amount of time DenyHosts will sleep between polling
328 # the SECURE_LOG. See the comments in the PURGE_DENY section (above)
329 # for details on specifying this value or for complete details
330 # refer to: http://denyhosts.sourceforge.net/faq.html#timespec
335 #######################################################################
337 #######################################################################
339 # DAEMON_PURGE: How often should DenyHosts, when run in daemon mode,
340 # run the purge mechanism to expire old entries in HOSTS_DENY
341 # This has no effect if PURGE_DENY is blank.
345 #######################################################################