This commit is contained in:
Javier Bértoli committed 2013-04-30 09:27:21 -03:00
1 parent 1f90c13091
commit 916748c427
3 files changed
+26 -17

No files matched your search

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