This commit is contained in:
Javier Bértoli
2013-04-30 09:27:21 -03:00
parent 1f90c13091
commit 916748c427
3 changed files with 26 additions and 17 deletions
+15 -10
View File
@@ -14,7 +14,8 @@
# Can be defined also by the (top scope) variable $fail2ban_myclass
#
# [*source*]
# Sets the content of source parameter for main configuration file (fail2ban.conf)
# Sets the content of source parameter for main configuration file
# (fail2ban.conf)
# If defined, fail2ban main config file will have the param: source => $source
# Can be defined also by the (top scope) variable $fail2ban_source
#
@@ -38,8 +39,8 @@
#
# [*ignoreip*]
# Fail2ban will not ban a host which matches an address in this list.
# Can an IP address, a CIDR mask or a DNS host. Several addresses can be defined
# in an array.
# Can an IP address, a CIDR mask or a DNS host. Several addresses can be
# definedin an array.
# Default: 127.0.0.1/8
#
# [*bantime*]
@@ -83,23 +84,27 @@
#
# [*jails_config*]
# Define how you want to manage jails configuration:
# "file" - To provide jail.local as a normal file. If you choose this option,
# set ONE of [*jails_source*] or [*jails_template*]
# "file" - To provide jail.local as a normal file. If you choose this
# option,set ONE of [*jails_source*] or [*jails_template*]
# "concat" - To build it up using different fragments
# - This option, (preferred), permits the use of the fail2ban::jail define
# - This option, (preferred), permits the use of the
# fail2ban::jail define
# Default: empty. Uses "jail.local" from distribution, if any.
#
# [*jails_source*]
# Sets the content of source parameter for the jail.local configuration file
#
# [*jails_template*]
# Sets the path to the template to use as content for the jail.local configuration file
# If defined, fail2ban jails config file has: content => content("$jails_template")
# Sets the path to the template to use as content for the jail.local
# configuration file
# If defined, fail2ban jails config file has:
# content => content("$jails_template")
# Note source and template parameters are mutually exclusive: don't use both
#
# [*jails*]
# When using [*jails_template*] you can have some control on what jail is enabled or not
# setting an array named "jails", containing the names of the jail you want enabled.
# When using [*jails_template*] you can have some control on what jail is
# enabled or not setting an array named "jails", containing the names of the
# jail you want enabled.
#
# [*jails_template_header*]
# Path to the template to use as header with concat
+9 -6
View File
@@ -6,18 +6,20 @@
# If not set, defaults to == $title
# $order - The order in the jail.local file.
# Default 50. Generally you don't need to change it
# $status - enabled / disabled. If disabled, the rule _IS ADDED_ to the jail.local file
# but it will not be active. Compare with the next one.
# $status - enabled / disabled. If disabled, the rule _IS ADDED_ to the
# jail.local file but it will not be active. Compare with the
# next one.
# Defaults to enabled
# $enable - true / false. If false, the rule _IS NOT ADDED_ to the jail.local file
# $enable - true / false. If false, the rule _IS NOT ADDED_ to the
# jail.local file
# Defaults to true
# $filter - The filter rule to use.
# If empty, defaults to == $jailname.
# $port - The port to filter. It can be an array of ports.
# $logpath - The log file to monitor
# $maxretry - How many fails are acceptable
# $action - The action to take when fail2ban finds $maxretry $filter-matching records in
# $logpath
# $action - The action to take when fail2ban finds $maxretry $filter-matching
# records in $logpath
# $bantime - How much time to apply the ban, in seconds
define fail2ban::jail (
@@ -51,7 +53,8 @@ define fail2ban::jail (
default => true,
}
# If we don't specify a filter, we take as a default the jailname as filtername
# If we don't specify a filter, we take as a default the
# jailname as filtername
$real_filter = $filter ? {
'' => $real_jailname,
default => $filter,
+2 -1
View File
@@ -63,7 +63,8 @@ class fail2ban::params {
# Define how you want to manage jails configuration:
# "file" - To provide jails stanzas as a normal file
# "concat" - To build them up using different fragments
# - This option, preferred, permits the use of the fail2ban::jail define
# - This option, preferred, permits the use of the
# fail2ban::jail define
$jails_config = ''
$jails_file = $::operatingsystem ? {