Advertisement
Guest User

Untitled

a guest
Feb 6th, 2014
186
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.53 KB | None | 0 0
  1. # Fail2Ban configuration file.
  2. #
  3. # This file was composed for Debian systems from the original one
  4. # provided now under /usr/share/doc/fail2ban/examples/jail.conf
  5. # for additional examples.
  6. #
  7. # To avoid merges during upgrades DO NOT MODIFY THIS FILE
  8. # and rather provide your changes in /etc/fail2ban/jail.local
  9. #
  10. # Author: Yaroslav O. Halchenko <debian@onerussian.com>
  11. #
  12. # $Revision$
  13. #
  14.  
  15. # The DEFAULT allows a global definition of the options. They can be overridden
  16. # in each jail afterwards.
  17.  
  18. [DEFAULT]
  19.  
  20. # "ignoreip" can be an IP address, a CIDR mask or a DNS host
  21. ignoreip = 127.0.0.1/8
  22. bantime = 6200
  23. findtime = 3600
  24. maxretry = 3
  25.  
  26. # "backend" specifies the backend used to get files modification. Available
  27. # options are "gamin", "polling" and "auto".
  28. # yoh: For some reason Debian shipped python-gamin didn't work as expected
  29. # This issue left ToDo, so polling is default backend for now
  30. backend = auto
  31.  
  32. #
  33. # Destination email address used solely for the interpolations in
  34. # jail.{conf,local} configuration files.
  35. destemail = root@localhost
  36.  
  37. #
  38. # ACTIONS
  39. #
  40.  
  41. # Default banning action (e.g. iptables, iptables-new,
  42. # iptables-multiport, shorewall, etc) It is used to define
  43. # action_* variables. Can be overridden globally or per
  44. # section within jail.local file
  45. banaction = iptables-multiport
  46.  
  47. # email action. Since 0.8.1 upstream fail2ban uses sendmail
  48. # MTA for the mailing. Change mta configuration parameter to mail
  49. # if you want to revert to conventional 'mail'.
  50. mta = sendmail
  51.  
  52. # Default protocol
  53. protocol = tcp
  54.  
  55. # Specify chain where jumps would need to be added in iptables-* actions
  56. chain = INPUT
  57.  
  58. #
  59. # Action shortcuts. To be used to define action parameter
  60.  
  61. # The simplest action to take: ban only
  62. action_ = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
  63.  
  64. # ban & send an e-mail with whois report to the destemail.
  65. action_mw = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
  66. %(mta)s-whois[name=%(__name__)s, dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]
  67.  
  68. # ban & send an e-mail with whois report and relevant log lines
  69. # to the destemail.
  70. action_mwl = %(banaction)s[name=%(__name__)s, port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]
  71. %(mta)s-whois-lines[name=%(__name__)s, dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]
  72.  
  73. # Choose default action. To change, just override value of 'action' with the
  74. # interpolation to the chosen action shortcut (e.g. action_mw, action_mwl, etc) in jail.local
  75. # globally (section [DEFAULT]) or per specific section
  76. action = %(action_)s
  77.  
  78. #
  79. # JAILS
  80. #
  81.  
  82. # Next jails corresponds to the standard configuration in Fail2ban 0.6 which
  83. # was shipped in Debian. Enable any defined here jail by including
  84. #
  85. # [SECTION_NAME]
  86. # enabled = true
  87.  
  88. #
  89. # in /etc/fail2ban/jail.local.
  90. #
  91. # Optionally you may override any other parameter (e.g. banaction,
  92. # action, port, logpath, etc) in that section within jail.local
  93.  
  94. [ssh]
  95.  
  96. enabled = true
  97. port = ssh
  98. filter = sshd
  99. logpath = /var/log/auth.log
  100. maxretry = 3
  101.  
  102. [dropbear]
  103.  
  104. enabled = false
  105. port = ssh
  106. filter = sshd
  107. logpath = /var/log/dropbear
  108. maxretry = 6
  109.  
  110. # Generic filter for pam. Has to be used with action which bans all ports
  111. # such as iptables-allports, shorewall
  112. [pam-generic]
  113.  
  114. enabled = false
  115. # pam-generic filter can be customized to monitor specific subset of 'tty's
  116. filter = pam-generic
  117. # port actually must be irrelevant but lets leave it all for some possible uses
  118. port = all
  119. banaction = iptables-allports
  120. port = anyport
  121. logpath = /var/log/auth.log
  122. maxretry = 6
  123.  
  124. [xinetd-fail]
  125.  
  126. enabled = false
  127. filter = xinetd-fail
  128. port = all
  129. banaction = iptables-multiport-log
  130. logpath = /var/log/daemon.log
  131. maxretry = 2
  132.  
  133.  
  134. [ssh-ddos]
  135.  
  136. enabled = false
  137. port = ssh
  138. filter = sshd-ddos
  139. logpath = /var/log/auth.log
  140. maxretry = 3
  141.  
  142. #
  143. # HTTP servers
  144. #
  145.  
  146. [apache]
  147.  
  148. enabled = true
  149. port = http,https
  150. filter = apache-auth
  151. logpath = /var/log/apache*/*error.log
  152. maxretry = 6
  153.  
  154. # default action is now multiport, so apache-multiport jail was left
  155. # for compatibility with previous (<0.7.6-2) releases
  156. [apache-multiport]
  157.  
  158. enabled = true
  159. port = http,https
  160. filter = apache-auth
  161. logpath = /var/log/apache*/*error.log
  162. maxretry = 6
  163.  
  164. [apache-noscript]
  165.  
  166. enabled = true
  167. port = http,https
  168. filter = apache-noscript
  169. logpath = /var/log/apache*/*error.log
  170. maxretry = 6
  171.  
  172. [apache-overflows]
  173.  
  174. enabled = true
  175. port = http,https
  176. filter = apache-overflows
  177. logpath = /var/log/apache*/*error.log
  178. maxretry = 2
  179.  
  180. #
  181. # FTP servers
  182. #
  183.  
  184. [vsftpd]
  185.  
  186. enabled = true
  187. port = ftp,ftp-data,ftps,ftps-data
  188. filter = vsftpd
  189. logpath = /var/log/vsftpd.log
  190. # or overwrite it in jails.local to be
  191. # logpath = /var/log/auth.log
  192. # if you want to rely on PAM failed login attempts
  193. # vsftpd's failregex should match both of those formats
  194. maxretry = 2
  195.  
  196.  
  197. [proftpd]
  198.  
  199. enabled = ture
  200. port = ftp,ftp-data,ftps,ftps-data
  201. filter = proftpd
  202. logpath = /var/log/proftpd/proftpd.log
  203. maxretry = 3
  204.  
  205.  
  206. [pure-ftpd]
  207.  
  208. enabled = true
  209. port = ftp,ftp-data,ftps,ftps-data
  210. filter = pure-ftpd
  211. logpath = /var/log/auth.log
  212. maxretry = 4
  213.  
  214.  
  215. [wuftpd]
  216.  
  217. enabled = false
  218. port = ftp,ftp-data,ftps,ftps-data
  219. filter = wuftpd
  220. logpath = /var/log/auth.log
  221. maxretry = 6
  222.  
  223.  
  224. #
  225. # Mail servers
  226. #
  227.  
  228. [postfix]
  229.  
  230. enabled = false
  231. port = smtp,ssmtp
  232. filter = postfix
  233. logpath = /var/log/mail.log
  234.  
  235.  
  236. [couriersmtp]
  237.  
  238. enabled = false
  239. port = smtp,ssmtp
  240. filter = couriersmtp
  241. logpath = /var/log/mail.log
  242.  
  243.  
  244. #
  245. # Mail servers authenticators: might be used for smtp,ftp,imap servers, so
  246. # all relevant ports get banned
  247. #
  248.  
  249. [courierauth]
  250.  
  251. enabled = false
  252. port = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
  253. filter = courierlogin
  254. logpath = /var/log/mail.log
  255.  
  256.  
  257. [sasl]
  258.  
  259. enabled = false
  260. port = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
  261. filter = sasl
  262. # You might consider monitoring /var/log/mail.warn instead if you are
  263. # running postfix since it would provide the same log lines at the
  264. # "warn" level but overall at the smaller filesize.
  265. logpath = /var/log/mail.log
  266.  
  267. [dovecot]
  268.  
  269. enabled = false
  270. port = smtp,ssmtp,imap2,imap3,imaps,pop3,pop3s
  271. filter = dovecot
  272. logpath = /var/log/mail.log
  273.  
  274. # DNS Servers
  275.  
  276.  
  277. # These jails block attacks against named (bind9). By default, logging is off
  278. # with bind9 installation. You will need something like this:
  279. #
  280. # logging {
  281. # channel security_file {
  282. # file "/var/log/named/security.log" versions 3 size 30m;
  283. # severity dynamic;
  284. # print-time yes;
  285. # };
  286. # category security {
  287. # security_file;
  288. # };
  289. # };
  290. #
  291. # in your named.conf to provide proper logging
  292.  
  293. # !!! WARNING !!!
  294. # Since UDP is connection-less protocol, spoofing of IP and imitation
  295. # of illegal actions is way too simple. Thus enabling of this filter
  296. # might provide an easy way for implementing a DoS against a chosen
  297. # victim. See
  298. # http://nion.modprobe.de/blog/archives/690-fail2ban-+-dns-fail.html
  299. # Please DO NOT USE this jail unless you know what you are doing.
  300. #[named-refused-udp]
  301. #
  302. #enabled = false
  303. #port = domain,953
  304. #protocol = udp
  305. #filter = named-refused
  306. #logpath = /var/log/named/security.log
  307.  
  308. [named-refused-tcp]
  309.  
  310. enabled = false
  311. port = domain,953
  312. protocol = tcp
  313. filter = named-refused
  314. logpath = /var/log/named/security.log
  315.  
  316. #Réseau MDE
  317. ignoreip = 46.218.167.43
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement