jail.local 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918
  1. # See jail.conf(5) man page for more information
  2. # Comments: use '#' for comment lines and ';' (following a space) for inline comments
  3. [INCLUDES]
  4. #before = paths-distro.conf
  5. before = paths-debian.conf
  6. # The DEFAULT allows a global definition of the options. They can be overridden
  7. # in each jail afterwards.
  8. ### Default ### {{{
  9. [DEFAULT]
  10. ### Misc Options ### {{{
  11. #
  12. # MISCELLANEOUS OPTIONS
  13. #
  14. # "ignoreip" can be an IP address, a CIDR mask or a DNS host. Fail2ban will not
  15. # ban a host which matches an address in this list. Several addresses can be
  16. # defined using space separator.
  17. ## Local host, and MA
  18. ignoreip = 127.0.0.1 205.166.94.31 2600:3c03::f03c:91ff:fe56:c573
  19. # External command that will take an tagged arguments to ignore, e.g. <ip>,
  20. # and return true if the IP is to be ignored. False otherwise.
  21. #
  22. # ignorecommand = /path/to/command <ip>
  23. ignorecommand =
  24. # "bantime" is the number of seconds that a host is banned.
  25. ## Three days
  26. bantime = 259200
  27. # A host is banned if it has generated "maxretry" during the last "findtime"
  28. ## one day
  29. findtime = 86400
  30. # "maxretry" is the number of failures before a host get banned.
  31. maxretry = 5
  32. # "backend" specifies the backend used to get files modification.
  33. # Available options are "pyinotify", "gamin", "polling", "systemd" and "auto".
  34. # This option can be overridden in each jail as well.
  35. #
  36. # pyinotify: requires pyinotify (a file alteration monitor) to be installed.
  37. # If pyinotify is not installed, Fail2ban will use auto.
  38. # gamin: requires Gamin (a file alteration monitor) to be installed.
  39. # If Gamin is not installed, Fail2ban will use auto.
  40. # polling: uses a polling algorithm which does not require external libraries.
  41. # systemd: uses systemd python library to access the systemd journal.
  42. # Specifying "logpath" is not valid for this backend.
  43. # See "journalmatch" in the jails associated filter config
  44. # auto: will try to use the following backends, in order:
  45. # pyinotify, gamin, polling.
  46. backend = auto
  47. # "usedns" specifies if jails should trust hostnames in logs,
  48. # warn when DNS lookups are performed, or ignore all hostnames in logs
  49. #
  50. # yes: if a hostname is encountered, a DNS lookup will be performed.
  51. # warn: if a hostname is encountered, a DNS lookup will be performed,
  52. # but it will be logged as a warning.
  53. # no: if a hostname is encountered, will not be used for banning,
  54. # but it will be logged as info.
  55. usedns = warn
  56. # "logencoding" specifies the encoding of the log files handled by the jail
  57. # This is used to decode the lines from the log file.
  58. # Typical examples: "ascii", "utf-8"
  59. #
  60. # auto: will use the system locale setting
  61. logencoding = auto
  62. # "enabled" enables the jails.
  63. # By default all jails are disabled, and it should stay this way.
  64. # Enable only relevant to your setup jails in your .local or jail.d/*.conf
  65. #
  66. # true: jail will be enabled and log files will get monitored for changes
  67. # false: jail is not enabled
  68. enabled = false
  69. # "filter" defines the filter to use by the jail.
  70. # By default jails have names matching their filter name
  71. #
  72. filter = %(__name__)s
  73. ### End Misc Options ### }}}
  74. ### Actions ### {{{
  75. #
  76. # ACTIONS
  77. #
  78. # Some options used for actions
  79. # Destination email address used solely for the interpolations in
  80. # jail.{conf,local,d/*} configuration files.
  81. destemail = root@localhost
  82. # Sender email address used solely for some actions
  83. sender = root@localhost
  84. # E-mail action. Since 0.8.1 Fail2Ban uses sendmail MTA for the
  85. # mailing. Change mta configuration parameter to mail if you want to
  86. # revert to conventional 'mail'.
  87. mta = mail
  88. #mta = sendmail
  89. # Default protocol
  90. protocol = tcp
  91. # Specify chain where jumps would need to be added in iptables-* actions
  92. chain = INPUT
  93. # Ports to be banned
  94. # Usually should be overridden in a particular jail
  95. port = 0:65535
  96. #
  97. # Action shortcuts. To be used to define action parameter
  98. # Default banning action (e.g. iptables, iptables-new,
  99. # iptables-multiport, shorewall, etc) It is used to define
  100. # action_* variables. Can be overridden globally or per
  101. # section within jail.local file
  102. banaction = iptables-multiport
  103. # The simplest action to take: ban only
  104. action_ = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
  105. # ban & send an e-mail with whois report to the destemail.
  106. action_mw = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
  107. %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]
  108. # ban & send an e-mail with whois report and relevant log lines
  109. # to the destemail.
  110. action_mwl = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
  111. %(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]
  112. # See the IMPORTANT note in action.d/xarf-login-attack for when to use this action
  113. #
  114. # ban & send a xarf e-mail to abuse contact of IP address and include relevant log lines
  115. # to the destemail.
  116. action_xarf = %(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
  117. xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath=%(logpath)s, port="%(port)s"]
  118. # Report block via blocklist.de fail2ban reporting service API
  119. #
  120. # See the IMPORTANT note in action.d/blocklist_de.conf for when to
  121. # use this action. Create a file jail.d/blocklist_de.local containing
  122. # [Init]
  123. # blocklist_de_apikey = {api key from registration]
  124. #
  125. action_blocklist_de = blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s"]
  126. # Report ban via badips.com, and use as blacklist
  127. #
  128. # See BadIPsAction docstring in config/action.d/badips.py for
  129. # documentation for this action.
  130. #
  131. # NOTE: This action relies on banaction being present on start and therefore
  132. # should be last action defined for a jail.
  133. #
  134. action_badips = badips.py[category="%(name)s", banaction="%(banaction)s"]
  135. # Choose default action. To change, just override value of 'action' with the
  136. # interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local
  137. # globally (section [DEFAULT]) or per specific section
  138. action = %(action_)s
  139. ### End Actions ### }}}
  140. ### End Default ### }}}
  141. ### Jails ### {{{
  142. #
  143. # JAILS
  144. #
  145. ### SSH Servers ### {{{
  146. #
  147. # SSH servers
  148. #
  149. ### ssh ### {{{
  150. [sshd]
  151. enabled = true
  152. ## one hour
  153. bantime = 3600
  154. ## ten minutes
  155. findtime = 600
  156. port = 500,8080
  157. logpath = %(sshd_log)s
  158. ### End ssh ### }}}
  159. ### dropbear ### {{{
  160. [dropbear]
  161. port = ssh
  162. logpath = %(dropbear_log)s
  163. ### End dropbear ### }}}
  164. ### selinux ### {{{
  165. [selinux-ssh]
  166. port = ssh
  167. logpath = %(auditd_log)s
  168. maxretry = 5
  169. ### End selinux ### }}}
  170. ### End SSH Servers ### }}}
  171. ### HTTP Servers ### {{{
  172. #
  173. # HTTP servers
  174. #
  175. ### apache ### {{{
  176. [apache-auth]
  177. port = http,https
  178. logpath = %(apache_error_log)s
  179. [apache-badbots]
  180. # Ban hosts which agent identifies spammer robots crawling the web
  181. # for email addresses. The mail outputs are buffered.
  182. port = http,https
  183. logpath = %(apache_access_log)s
  184. bantime = 172800
  185. maxretry = 1
  186. [apache-noscript]
  187. port = http,https
  188. logpath = %(apache_error_log)s
  189. maxretry = 6
  190. [apache-overflows]
  191. port = http,https
  192. logpath = %(apache_error_log)s
  193. maxretry = 2
  194. [apache-nohome]
  195. port = http,https
  196. logpath = %(apache_error_log)s
  197. maxretry = 2
  198. [apache-botsearch]
  199. port = http,https
  200. logpath = %(apache_error_log)s
  201. maxretry = 2
  202. [apache-modsecurity]
  203. port = http,https
  204. logpath = %(apache_error_log)s
  205. maxretry = 2
  206. [apache-shellshock]
  207. port = http,https
  208. logpath = $(apache_error_log)s
  209. maxretry = 1
  210. ### End apache ### }}}
  211. ### nginx ### {{{
  212. [nginx-http-auth]
  213. enabled = true
  214. filter = nginx-http-auth
  215. ports = http,https
  216. #logpath = %(nginx_error_log)s
  217. logpath = /var/log/nginx/error.log
  218. [nginx-noscript]
  219. enabled = true
  220. port = http,https
  221. filter = nginx-noscript
  222. logpath = /var/log/nginx/access.log
  223. maxretry = 4
  224. ## One week
  225. bantime = 604800
  226. ## Four days
  227. findtime = 345600
  228. [nginx-badbots]
  229. enabled = true
  230. port = http,https
  231. filter = nginx-badbots
  232. logpath = /var/log/nginx/access.log
  233. maxretry = 1
  234. ## One week
  235. bantime = 604800
  236. ## Four days
  237. findtime = 345600
  238. [nginx-botsearch]
  239. enabled = true
  240. port = http,https
  241. filter = nginx-botsearch
  242. logpath = /var/log/nginx/access.log
  243. maxretry = 2
  244. ## One week
  245. bantime = 604800
  246. ## Four days
  247. findtime = 345600
  248. [nginx-nohome]
  249. enabled = true
  250. port = http,https
  251. filter = nginx-nohome
  252. logpath = /var/log/nginx/access.log
  253. maxretry = 2
  254. ## One week
  255. bantime = 604800
  256. ## Four days
  257. findtime = 345600
  258. [nginx-noproxy]
  259. enabled = false
  260. port = http,https
  261. filter = nginx-noproxy
  262. logpath = /var/log/nginx/access.log
  263. maxretry = 2
  264. ## One week
  265. bantime = 604800
  266. ## Four days
  267. findtime = 345600
  268. [nginx-lurkers]
  269. enabled = true
  270. port = http,https
  271. filter = nginx-lurkers
  272. logpath = /var/log/nginx/access.log
  273. /var/log/nginx/ttrss_access.log
  274. /var/log/nginx/piwik_access.log
  275. /var/log/nginx/irpg_access.log
  276. maxretry = 1
  277. ## One Month
  278. bantime = 2628002
  279. ## Four days
  280. findtime = 345600
  281. [nginx-bbb-sent]
  282. enabled = true
  283. port = http,https
  284. filter = nginx-bbb-sent
  285. logpath = /var/log/nginx/access.log
  286. maxretry = 1
  287. ## One Month
  288. bantime = 2628002
  289. ## Four days
  290. findtime = 345600
  291. [nginx-req-limit]
  292. enabled = false
  293. port = http,https
  294. filter = nginx-limit-req
  295. logpath = /var/log/nginx/*error.log
  296. ## One week
  297. bantime = 604800
  298. ## Four days
  299. findtime = 345600
  300. maxretry = 10
  301. [nginx-rss-over-scrape]
  302. enabled = false
  303. port = = http,https
  304. filter = nginx-rss-over-scrape
  305. logpath = /var/log/nginx/access.log
  306. maxretry = 3
  307. ## thirty-six hours
  308. bantime = 129600
  309. ## Six hours
  310. findtime = 21600
  311. ### End nginx ### }}}
  312. ### php-url-fopen ### {{{
  313. # Ban attackers that try to use PHP's URL-fopen() functionality
  314. # through GET/POST variables. - Experimental, with more than a year
  315. # of usage in production environments.
  316. [php-url-fopen]
  317. port = http,https
  318. logpath = %(nginx_access_log)s %(apache_access_log)s
  319. ### end php-url-fopen ### }}}
  320. ### suhosin ### {{{
  321. [suhosin]
  322. port = http,https
  323. logpath = %(suhosin_log)s
  324. ### End suhosin ### }}}
  325. ### lighttpd ### {{{
  326. [lighttpd-auth]
  327. # Same as above for Apache's mod_auth
  328. # It catches wrong authentifications
  329. port = http,https
  330. logpath = %(lighttpd_error_log)s
  331. ### End lighttpd ### }}}
  332. ### End HTTP Servers ### }}}
  333. ### Webmail ### {{{
  334. #
  335. # Webmail and groupware servers
  336. #
  337. ### roundcube ### {{{
  338. [roundcube-auth]
  339. port = http,https
  340. logpath = /var/log/roundcube/userlogins
  341. ### End roundcube ### }}}
  342. ### openwebmail ### {{{
  343. [openwebmail]
  344. port = http,https
  345. logpath = /var/log/openwebmail.log
  346. ### End openwebmail ### }}}
  347. ### horde ### {{{
  348. [horde]
  349. port = http,https
  350. logpath = /var/log/horde/horde.log
  351. ### End horde ### }}}
  352. ### groupoffice ### {{{
  353. [groupoffice]
  354. port = http,https
  355. logpath = /home/groupoffice/log/info.log
  356. ### End groupoffice ### }}}
  357. ### sogo ### {{{
  358. [sogo-auth]
  359. # Monitor SOGo groupware server
  360. # without proxy this would be:
  361. # port = 20000
  362. port = http,https
  363. logpath = /var/log/sogo/sogo.log
  364. ### End sogo ### }}}
  365. ### tine20 ### {{{
  366. [tine20]
  367. logpath = /var/log/tine20/tine20.log
  368. port = http,https
  369. maxretry = 5
  370. ### End tine20 ### }}}
  371. ### End Webmail ### }}}
  372. ### Web Apps ### {{{
  373. #
  374. # Web Applications
  375. #
  376. #
  377. ### guacamole ### {{{
  378. [guacamole]
  379. port = http,https
  380. logpath = /var/log/tomcat*/catalina.out
  381. ### End quacamole ### }}}
  382. ### monit ### {{{
  383. [monit]
  384. #Ban clients brute-forcing the monit gui login
  385. filter = monit
  386. port = 2812
  387. logpath = /var/log/monit
  388. ### End monit ### }}}
  389. ### webmin ### {{{
  390. [webmin-auth]
  391. port = 10000
  392. logpath = %(syslog_authpriv)s
  393. ### End webmin ### }}}
  394. ### End Web Apps ### }}}
  395. ### HTTP Proxy Servers ### {{{
  396. #
  397. # HTTP Proxy servers
  398. #
  399. #
  400. ### squid ### {{{
  401. [squid]
  402. port = 80,443,3128,8080
  403. logpath = /var/log/squid/access.log
  404. ### End squid ### }}}
  405. ### 3proxy ### {{{
  406. [3proxy]
  407. port = 3128
  408. logpath = /var/log/3proxy.log
  409. ### End 3proxy ### }}}
  410. ### End HTTP Proxy Servers ### }}}
  411. ### FTP Servers ### {{{
  412. #
  413. # FTP servers
  414. #
  415. ### proftpd ### {{{
  416. [proftpd]
  417. port = ftp,ftp-data,ftps,ftps-data
  418. logpath = %(proftpd_log)s
  419. ### End proftpd ### }}}
  420. ### pure ### {{{
  421. [pure-ftpd]
  422. port = ftp,ftp-data,ftps,ftps-data
  423. logpath = %(pureftpd_log)s
  424. maxretry = 6
  425. ### End pure ### }}}
  426. ### gssftpd ### {{{
  427. [gssftpd]
  428. port = ftp,ftp-data,ftps,ftps-data
  429. logpath = %(syslog_daemon)s
  430. maxretry = 6
  431. ### End gssftpd ### }}}
  432. ### wuftpd ### {{{
  433. [wuftpd]
  434. port = ftp,ftp-data,ftps,ftps-data
  435. logpath = %(wuftpd_log)s
  436. maxretry = 6
  437. ### End wuftpd ### }}}
  438. ### End vsftpd ### {{{
  439. [vsftpd]
  440. # or overwrite it in jails.local to be
  441. # logpath = %(syslog_authpriv)s
  442. # if you want to rely on PAM failed login attempts
  443. # vsftpd's failregex should match both of those formats
  444. port = ftp,ftp-data,ftps,ftps-data
  445. logpath = %(vsftpd_log)s
  446. ### End vsftpd ### }}}
  447. ### End FTP Servers ### }}}
  448. ### Mail Servers ### {{{
  449. #
  450. # Mail servers
  451. #
  452. ### assp ### ### {{{
  453. # ASSP SMTP Proxy Jail
  454. [assp]
  455. port = smtp,465,submission
  456. logpath = /root/path/to/assp/logs/maillog.txt
  457. ### End assp ### }}}
  458. ### courier ### {{{
  459. [courier-smtp]
  460. port = smtp,465,submission
  461. logpath = %(syslog_mail)s
  462. ### End courier ### }}}
  463. ### postfix ### {{{
  464. [postfix]
  465. port = smtp,465,submission
  466. logpath = %(postfix_log)s
  467. ### End postfix ### }}}
  468. ### sendmail ### {{{
  469. [sendmail-auth]
  470. port = submission,465,smtp
  471. logpath = %(syslog_mail)s
  472. [sendmail-reject]
  473. port = smtp,465,submission
  474. logpath = %(syslog_mail)s
  475. ### End send mail ### }}}
  476. ### qmail ### {{{
  477. [qmail-rbl]
  478. filter = qmail
  479. port = smtp,465,submission
  480. logpath = /service/qmail/log/main/current
  481. ### End qmail ### }}}
  482. ### davecot ### {{{
  483. # dovecot defaults to logging to the mail syslog facility
  484. # but can be set by syslog_facility in the dovecot configuration.
  485. [dovecot]
  486. port = pop3,pop3s,imap,imaps,submission,465,sieve
  487. logpath = %(dovecot_log)s
  488. ### End davecot ### }}}
  489. ### sieve ### {{{
  490. [sieve]
  491. port = smtp,465,submission
  492. logpath = %(dovecot_log)s
  493. ### End sieve ### }}}
  494. ### solid ### {{{
  495. [solid-pop3d]
  496. port = pop3,pop3s
  497. logpath = %(solidpop3d_log)s
  498. ### End solid ### }}}
  499. ### exim ### {{{
  500. [exim]
  501. port = smtp,465,submission
  502. logpath = %(exim_main_log)s
  503. [exim-spam]
  504. port = smtp,465,submission
  505. logpath = %(exim_main_log)s
  506. ### End exim ### }}}
  507. ### kerio ### {{{
  508. [kerio]
  509. port = imap,smtp,imaps,465
  510. logpath = /opt/kerio/mailserver/store/logs/security.log
  511. ### End kerio ### }}}
  512. ### End Mail Servers ### }}}
  513. ### Mail Authenticators ### {{{
  514. #
  515. # Mail servers authenticators: might be used for smtp,ftp,imap servers, so
  516. # all relevant ports get banned
  517. #
  518. ### courier ### {{{
  519. [courier-auth]
  520. port = smtp,465,submission,imap3,imaps,pop3,pop3s
  521. logpath = %(syslog_mail)s
  522. ### End courier ### }}}
  523. ### postfix ### {{{
  524. [postfix-sasl]
  525. port = smtp,465,submission,imap3,imaps,pop3,pop3s
  526. # You might consider monitoring /var/log/mail.warn instead if you are
  527. # running postfix since it would provide the same log lines at the
  528. # "warn" level but overall at the smaller filesize.
  529. logpath = %(postfix_log)s
  530. ### End postfix ### }}}
  531. ### perdition ### {{{
  532. [perdition]
  533. port = imap3,imaps,pop3,pop3s
  534. logpath = %(syslog_mail)s
  535. ### End perdition ### }}}
  536. ### squirrelmail ### {{{
  537. [squirrelmail]
  538. port = smtp,465,submission,imap2,imap3,imaps,pop3,pop3s,http,https,socks
  539. logpath = /var/lib/squirrelmail/prefs/squirrelmail_access_log
  540. ### End squirrelmail ### }}}
  541. ### cyrus ### {{{
  542. [cyrus-imap]
  543. port = imap3,imaps
  544. logpath = %(syslog_mail)s
  545. ### End cyrus ### }}}
  546. ### uwimap ### {{{
  547. [uwimap-auth]
  548. port = imap3,imaps
  549. logpath = %(syslog_mail)s
  550. ### End uwimap ### }}}
  551. ### End Mail Authenticators ### }}}
  552. ### DNS Servers ### {{{
  553. #
  554. #
  555. # DNS servers
  556. #
  557. ### named ### {{{
  558. # !!! WARNING !!!
  559. # Since UDP is connection-less protocol, spoofing of IP and imitation
  560. # of illegal actions is way too simple. Thus enabling of this filter
  561. # might provide an easy way for implementing a DoS against a chosen
  562. # victim. See
  563. # http://nion.modprobe.de/blog/archives/690-fail2ban-+-dns-fail.html
  564. # Please DO NOT USE this jail unless you know what you are doing.
  565. #
  566. # IMPORTANT: see filter.d/named-refused for instructions to enable logging
  567. # This jail blocks UDP traffic for DNS requests.
  568. # [named-refused-udp]
  569. #
  570. # filter = named-refused
  571. # port = domain,953
  572. # protocol = udp
  573. # logpath = /var/log/named/security.log
  574. # IMPORTANT: see filter.d/named-refused for instructions to enable logging
  575. # This jail blocks TCP traffic for DNS requests.
  576. [named-refused]
  577. port = domain,953
  578. logpath = /var/log/named/security.log
  579. ### End named ### }}}
  580. ### nsd ### {{{
  581. [nsd]
  582. port = 53
  583. action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
  584. %(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
  585. logpath = /var/log/nsd.log
  586. ### End nds ### }}}
  587. ### End DNS Servers ### }}}
  588. ### Misc Jails ### {{{
  589. #
  590. # Miscellaneous
  591. #
  592. ### fail2ban Multiple Bans ### {{{
  593. [fail2ban]
  594. enabled = false
  595. filter = fail2ban
  596. action = iptables-allports[name=fail2ban]
  597. logpath = /var/log/fail2ban*
  598. maxretry = 3
  599. # findtime: 5 days
  600. findtime = 432000
  601. # bantime: FOREVER
  602. bantime = -1
  603. ### End fail2ban Multiple ### }}}
  604. ### asterisk ### {{{
  605. [asterisk]
  606. port = 5060,5061
  607. action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
  608. %(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
  609. %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s"]
  610. logpath = /var/log/asterisk/messages
  611. maxretry = 10
  612. ### End asterisk ### }}}
  613. ### freeswitch ### {{{
  614. [freeswitch]
  615. port = 5060,5061
  616. action = %(banaction)s[name=%(__name__)s-tcp, port="%(port)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
  617. %(banaction)s[name=%(__name__)s-udp, port="%(port)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
  618. %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s"]
  619. logpath = /var/log/freeswitch.log
  620. maxretry = 10
  621. ### End freeswitch ### }}}
  622. ### mysqld ### {{{
  623. # To log wrong MySQL access attempts add to /etc/my.cnf in [mysqld] or
  624. # equivalent section:
  625. # log-warning = 2
  626. #
  627. # for syslog (daemon facility)
  628. # [mysqld_safe]
  629. # syslog
  630. #
  631. # for own logfile
  632. # [mysqld]
  633. # log-error=/var/log/mysqld.log
  634. [mysqld-auth]
  635. port = 3306
  636. logpath = %(mysql_log)s
  637. maxretry = 5
  638. ### End mysgld ### }}}
  639. ### recidive ### {{{
  640. # Jail for more extended banning of persistent abusers
  641. # !!! WARNING !!!
  642. # Make sure that your loglevel specified in fail2ban.conf/.local
  643. # is not at DEBUG level -- which might then cause fail2ban to fall into
  644. # an infinite loop constantly feeding itself with non-informative lines
  645. [recidive]
  646. logpath = /var/log/fail2ban.log
  647. port = all
  648. protocol = all
  649. bantime = 604800 ; 1 week
  650. findtime = 86400 ; 1 day
  651. maxretry = 5
  652. ### End recidive ### }}}
  653. ### pam-generic ### {{{
  654. # Generic filter for PAM. Has to be used with action which bans all
  655. # ports such as iptables-allports, shorewall
  656. [pam-generic]
  657. # pam-generic filter can be customized to monitor specific subset of 'tty's
  658. banaction = iptables-allports
  659. logpath = %(syslog_authpriv)s
  660. ### End pam-generic ### }}}
  661. ### xinetd-fail ### {{{
  662. [xinetd-fail]
  663. banaction = iptables-multiport-log
  664. logpath = %(syslog_daemon)s
  665. maxretry = 2
  666. ### End xinetd-fail ### }}}
  667. ### stunnel ### {{{
  668. # stunnel - need to set port for this
  669. [stunnel]
  670. logpath = /var/log/stunnel4/stunnel.log
  671. [ejabberd-auth]
  672. port = 5222
  673. logpath = /var/log/ejabberd/ejabberd.log
  674. ### End stunnel ### }}}
  675. ### counter-strike ### {{{
  676. [counter-strike]
  677. logpath = /opt/cstrike/logs/L[0-9]*.log
  678. # Firewall: http://www.cstrike-planet.com/faq/6
  679. tcpport = 27030,27031,27032,27033,27034,27035,27036,27037,27038,27039
  680. udpport = 1200,27000,27001,27002,27003,27004,27005,27006,27007,27008,27009,27010,27011,27012,27013,27014,27015
  681. action = %(banaction)s[name=%(__name__)s-tcp, port="%(tcpport)s", protocol="tcp", chain="%(chain)s", actname=%(banaction)s-tcp]
  682. %(banaction)s[name=%(__name__)s-udp, port="%(udpport)s", protocol="udp", chain="%(chain)s", actname=%(banaction)s-udp]
  683. ### End couter-strike ### }}}
  684. ### nagios ### {{{
  685. # consider low maxretry and a long bantime
  686. # nobody except your own Nagios server should ever probe nrpe
  687. [nagios]
  688. enabled = false
  689. logpath = %(syslog_daemon)s ; nrpe.cfg may define a different log_facility
  690. maxretry = 1
  691. ### End nagios ### }}}
  692. ### oracleims ### {{{
  693. [oracleims]
  694. # see "oracleims" filter file for configuration requirement for Oracle IMS v6 and above
  695. enabled = false
  696. logpath = /opt/sun/comms/messaging64/log/mail.log_current
  697. maxretry = 6
  698. banaction = iptables-allports
  699. ### End oracleims ### }}}
  700. ### directadmin ### {{{
  701. [directadmin]
  702. enabled = false
  703. logpath = /var/log/directadmin/login.log
  704. port = 2222
  705. ### End directadmin ### }}}
  706. ### portsentry ### {{{
  707. [portsentry]
  708. enabled = false
  709. logpath = /var/lib/portsentry/portsentry.history
  710. maxretry = 1
  711. ### End portsentry ### }}}
  712. ### End Misc Jails ### }}}
  713. ### End Jails ### }}}