From ab94577ae7093a2a24b2b555f6750d00c74c690c Mon Sep 17 00:00:00 2001
From: Jenkins Server
- No issue
-dc918f331ab225f Arne Teuke 2017-08-03 11:01:32
+82035d505ca0352 Arne Teuke 2017-08-03 12:13:00
initial commit
+added service control
+
+
+
+
|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_fail2ban| 0.0.0.2 | cd_fail2ban| 0.0.0.3 | {Build
Status/]|
firewalld: firewalld is auto-installed on CentOS7 as dependency of fail2ban +by yum.
+|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_fail2ban| 0.0.0.2 | cd_fail2ban| 0.0.0.3 | {Build
Status/]|
firewalld: firewalld is auto-installed on CentOS7 as dependency of fail2ban +by yum.
+cd_fail2ban::main::dirs.pp Module name: cd_fail2ban Author: Arne Teuke -(arne_teuke@ConfDroid.com)
+(arne_teuke@confdroid.com) +License: + This file is part of cd_fail2ban. -cd_fail2ban is used for providing automatic configuration of Fail2Ban -
This file is part of cd_fail2ban.
- -cd_fail2ban is used for providing automatic configuration of - <service / -purpose> - Copyright (C) 2016 ConfDroid (copyright@ConfDroid.com) - This -program is free software: you can redistribute it and/or modify - it under -the terms of the GNU General Public License as published by - the Free -Software Foundation, either version 3 of the License, or - (at your option) -any later version.
+Copyright (C) 2017 confdroid (copyright@confdroid.com) + This program is +free software: you can redistribute it and/or modify + it under the terms of +the GNU General Public License as published by + the Free Software +Foundation, either version 3 of the License, or + (at your option) any later +version.This program is distributed in the hope that it will be useful, but @@ -130,6 +127,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/.
+23 24 25 26 @@ -138,10 +136,90 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. 29 30 31 -32+32 +33 +34 +35 +36 +37 +38 +39 +40 +41 +42 +43 +44 +45 +46 +47 +48 +49 +50 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +97 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110 +111 +112
# File 'manifests/main/dirs.pp', line 24
+ # File 'manifests/main/dirs.pp', line 23
class cd_fail2ban::main::dirs (
@@ -149,8 +227,89 @@ class cd_fail2ban::main::dirs (
require cd_fail2ban::main::install
+ # manage main dir
+ file { $fn_main_dir:
+ ensure => directory,
+ path => $fn_main_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+ # manage action.d dir
+
+ file { $fn_action_d_dir:
+ ensure => directory,
+ path => $fn_action_d_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+
+ # manage fail2ban.d dir
+
+ file { $fn_fail2ban_d_dir:
+ ensure => directory,
+ path => $fn_fail2ban_d_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+
+ # manage filter.d dir
+
+ file { $fn_filter_d_dir:
+ ensure => directory,
+ path => $fn_filter_d_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+
+ # manage jail.d dir
+
+ file { $fn_jail_d_dir:
+ ensure => directory,
+ path => $fn_jail_d_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
+
+ # manage /var/lib/fail2ban
+
+ file { $fn_var_lib_dir:
+ ensure => directory,
+ path => $fn_var_lib_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ }
}
latest or present.
44
45
46
-47
+47
+48
+49
+50
+51
+52
+53
+54
+55
+56
+57
+58
+59
+60
+61
+62
# File 'manifests/params.pp', line 27 @@ -212,11 +227,26 @@ $fn_enable_fail2ban = true, # installation section $reqpackages = $::operatingsystem ? { - /(?i-mx:centos|fedora|redhat)/ => ['fail2ban'], + /(?i-mx:centos|fedora|redhat)/ => ['fail2ban','fail2ban-firewalld', + 'fail2ban-sendmail', + 'fail2ban-server.noarch'], } + + # service -$fn_service = 'fail2ban' +$fn_service = 'fail2ban' + +# directories +$fn_main_dir = '/etc/fail2ban' +$fn_action_d_dir = "${fn_main_dir}/action.d" +$fn_fail2ban_d_dir = "${fn_main_dir}/fail2ban.d" +$fn_filter_d_dir = "${fn_main_dir}/filter.d" +$fn_jail_d_dir = "${fn_main_dir}/jail.d" +$fn_var_lib_dir = '/var/lib/fail2ban' + + +# files # includes must be last @@ -230,7 +260,7 @@ $fn_service = 'fail2ban' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index bcf9706..719adc9 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@ From 3fdfda26d55dc965d4342b3bd5fc4e9bf165ad76 Mon Sep 17 00:00:00 2001 From: Jenkins Server@@ -318,7 +318,7 @@ class cd_fail2ban::main::dirs ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html index 4cca46d..8fb404a 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html @@ -152,7 +152,7 @@ class cd_fail2ban::main::files ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html index 8223443..3737d5f 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html @@ -159,7 +159,7 @@ class cd_fail2ban::main::install ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html index 5bba949..d108ef2 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html @@ -164,7 +164,7 @@ class cd_fail2ban::main::service ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html b/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html index 37c7f9e..cec7144 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html @@ -260,7 +260,7 @@ $fn_var_lib_dir = '/var/lib/fail2ban' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 719adc9..deae4d9 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@ From a22f3fb29e723615e1dd085e048f839beecd89e6 Mon Sep 17 00:00:00 2001 From: Jenkins ServerDate: Thu, 3 Aug 2017 15:10:45 +0200 Subject: [PATCH 2/7] recommit for updates in build 6 --- CHANGELOG.md | 10 ++++++++++ doc/_index.html | 2 +- doc/file.README.html | 2 +- doc/index.html | 2 +- doc/puppet_classes/cd_fail2ban.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aconfig.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Adirs.html | 4 ++-- .../cd_fail2ban_3A_3Amain_3A_3Afiles.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Ainstall.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aservice.html | 2 +- doc/puppet_classes/cd_fail2ban_3A_3Aparams.html | 2 +- doc/top-level-namespace.html | 2 +- 12 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index da695c8..929b8c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Changelog of Git Changelog. No issue
+3c581b56cc82cb9 Arne Teuke 2017-08-03 13:01:25 ++
added directory control
+ + +ab94577ae7093a2 Jenkins Server 2017-08-03 13:01:03 ++
recommit for updates in build 4
+ + 82035d505ca0352 Arne Teuke 2017-08-03 12:13:00
added service control
diff --git a/doc/_index.html b/doc/_index.html index b999eaa..fb70178 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -132,7 +132,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index 70fc01a..7fc480b 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -242,7 +242,7 @@ environments. diff --git a/doc/index.html b/doc/index.html index ac62e2c..eb53701 100644 --- a/doc/index.html +++ b/doc/index.html @@ -242,7 +242,7 @@ environments. diff --git a/doc/puppet_classes/cd_fail2ban.html b/doc/puppet_classes/cd_fail2ban.html index 0ee6cfa..cc1d3a6 100644 --- a/doc/puppet_classes/cd_fail2ban.html +++ b/doc/puppet_classes/cd_fail2ban.html @@ -139,7 +139,7 @@ class cd_fail2ban { diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html index 4dd24bd..ef6344d 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html @@ -155,7 +155,7 @@ class cd_fail2ban::main::config ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html index 69bbcb1..8bd8578 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html @@ -307,7 +307,7 @@ class cd_fail2ban::main::dirs ( mode => '0755', selrange => s0, selrole => object_r, - seltype => etc_t, + seltype => fail2ban_var_lib_t, seluser => system_u, } }
+
+
|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_fail2ban| 0.0.0.3 | cd_fail2ban| 0.0.0.4 | {Build
Status/]|
Installation * install required binaries
+Configuration +* manage directory structure (file system permissions, +selinux context) +* manage configration files (file system permissions, +selinux context, content based on parameters)
+ +Service +* manage service status (running or stopped)
+Repostructure has moved to REPOSTRUCTURE.md in repo.
@@ -242,7 +251,7 @@ environments. diff --git a/doc/index.html b/doc/index.html index eb53701..e8815cd 100644 --- a/doc/index.html +++ b/doc/index.html @@ -61,7 +61,7 @@|Repo Name| version | Build
Status|
|---|---|---|---|
-|cd_fail2ban| 0.0.0.3 | cd_fail2ban| 0.0.0.4 | {Build
Status/]|
Installation * install required binaries
+Configuration +* manage directory structure (file system permissions, +selinux context) +* manage configration files (file system permissions, +selinux context, content based on parameters)
+ +Service +* manage service status (running or stopped)
+Repostructure has moved to REPOSTRUCTURE.md in repo.
@@ -242,7 +251,7 @@ environments. diff --git a/doc/puppet_classes/cd_fail2ban.html b/doc/puppet_classes/cd_fail2ban.html index cc1d3a6..d998ea2 100644 --- a/doc/puppet_classes/cd_fail2ban.html +++ b/doc/puppet_classes/cd_fail2ban.html @@ -139,7 +139,7 @@ class cd_fail2ban { diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html index ef6344d..086a584 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html @@ -134,8 +134,7 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. 27 28 29 -30 -31 +30# File 'manifests/main/config.pp', line 24
@@ -144,9 +143,8 @@ class cd_fail2ban::main::config (
) inherits cd_fail2ban::params {
- if $fn_enable_fail2ban == true {
include cd_fail2ban::main::service
- }
+
}
# File 'manifests/main/dirs.pp', line 23
@@ -310,6 +326,22 @@ class cd_fail2ban::main::dirs (
seltype => fail2ban_var_lib_t,
seluser => system_u,
}
+
+ # manage /var/run/fail2bam
+
+ file { $fn_var_run_dir:
+ ensure => directory,
+ path => $fn_var_run_dir,
+ owner => 'root',
+ group => 'root',
+ mode => '0755',
+ selrange => s0,
+ selrole => object_r,
+ seltype => fail2ban_var_run_t,
+ seluser => system_u,
+ }
+
+
}
# File 'manifests/main/files.pp', line 23
@@ -144,6 +179,41 @@ class cd_fail2ban::main::files (
require cd_fail2ban::main::dirs
+ if $fn_manage_config == true {
+
+ # manage fail2ban.conf
+
+ file { $fn_fail2ban_conf_file:
+ ensure => present,
+ path => $fn_fail2ban_conf_file,
+ owner => 'root',
+ group => 'root',
+ mode => '0640',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ content => template($fn_fail2ban_conf_erb),
+ notify => Service[$fn_service],
+ }
+
+ # manage fail2ban.local
+
+ file { $fn_fail2ban_local_file:
+ ensure => present,
+ path => $fn_fail2ban_local_file,
+ owner => 'root',
+ group => 'root',
+ mode => '0640',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ content => template($fn_fail2ban_conf_erb),
+ notify => Service[$fn_service],
+ }
+
+ }
}
# File 'manifests/main/service.pp', line 23
@@ -151,11 +152,12 @@ class cd_fail2ban::main::service (
require cd_fail2ban::main::files
service { $fn_service:
- ensure => running,
+ ensure => $fn_enable_service,
hasstatus => true,
hasrestart => true,
enable => true,
}
+
}
You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses/.
+href="http://www.gnu.org/licenses">www.gnu.org/licenses/. +CRITICAL,ERROR,WARNING,NOTICE,INFO
+and DEBUG.
@@ -156,15 +158,183 @@ to choose, i.e. latest or present.
Whether to manage the fail2ban +configuration files. If set to false, +fail2ban will be installed, but the +configuration will not be managed.
+Whether to enable/start or disable/stop
+the fail2ban service. Valid options
+are running or stopped.
Set the log level output. Valid options are
+Set the log target. This could be a file, +SYSLOG, STDERR or STDOUT. Only +one log target can be specified.
+Set the syslog socket file. Only used when +logtarget is SYSLOG. auto uses +platform.system() to determine predefined +paths Valid options: [ auto | +FILE ].
+Set the socket file to communicate with the daemon.
+Set the PID file to store the process ID of the +fail2ban server.
+file for the fail2ban persistent data to be stored. +A value of +":memory:" means database is only stored in memory +and data is +lost when fail2ban is stopped. +A value of "None" disables the +database.
+age in seconds at which bans should be purged +from the database.
+latest or present.
-27 -28 -29 -30 -31 -32 -33 -34 -35 -36 -37 -38 -39 -40 -41 -42 -43 -44 -45 -46 -47 48 49 50 @@ -212,16 +361,59 @@ to choose, i.e.+62 +63 +64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96latestorpresent. 59 60 61 -62
# File 'manifests/params.pp', line 27 +# File 'manifests/params.pp', line 48 class cd_fail2ban::params ( -$pkg_ensure = 'latest', +$pkg_ensure = 'latest', + +$fn_manage_config = true, +$fn_enable_service = 'running', +$fn_loglevel = 'INFO', +$fn_logtarget = 'SYSLOG', +$fn_syslogsocket = 'auto', +$fn_socket = '/var/run/fail2ban/fail2ban.sock', +$fn_pidfile = '/var/run/fail2ban/fail2ban.pid', +$fn_dbfile = '/var/lib/fail2ban/fail2ban.sqlite3', +$fn_dbpurgeage = '86400', -$fn_enable_fail2ban = true, ) { @@ -235,18 +427,22 @@ $reqpackages = $::operatingsystem ? { # service -$fn_service = 'fail2ban' +$fn_service = 'fail2ban' # directories -$fn_main_dir = '/etc/fail2ban' -$fn_action_d_dir = "${fn_main_dir}/action.d" -$fn_fail2ban_d_dir = "${fn_main_dir}/fail2ban.d" -$fn_filter_d_dir = "${fn_main_dir}/filter.d" -$fn_jail_d_dir = "${fn_main_dir}/jail.d" -$fn_var_lib_dir = '/var/lib/fail2ban' - +$fn_main_dir = '/etc/fail2ban' +$fn_action_d_dir = "${fn_main_dir}/action.d" +$fn_fail2ban_d_dir = "${fn_main_dir}/fail2ban.d" +$fn_filter_d_dir = "${fn_main_dir}/filter.d" +$fn_jail_d_dir = "${fn_main_dir}/jail.d" +$fn_var_lib_dir = '/var/lib/fail2ban' +$fn_var_run_dir = '/var/run/fail2ban' # files +$fn_fail2ban_conf_file = "${fn_main_dir}fail2ban.conf" +$fn_fail2ban_conf_erb = 'cd_fail2ban/fail2ban_conf.erb' +$fn_fail2ban_local_file = "${fn_main_dir}fail2ban.local" +$fn_fail2ban_local_erb = 'cd_fail2ban/fail2ban_local.erb' # includes must be last @@ -260,7 +456,7 @@ $fn_var_lib_dir = '/var/lib/fail2ban' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index deae4d9..0410a43 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@ From 21086d1f714fd6aadd6c5d5627b0c1886618658a Mon Sep 17 00:00:00 2001 From: Jenkins Server+95Date: Thu, 3 Aug 2017 16:51:10 +0200 Subject: [PATCH 4/7] recommit for updates in build 8 --- CHANGELOG.md | 10 ++++++++++ doc/_index.html | 2 +- doc/file.README.html | 2 +- doc/index.html | 2 +- doc/puppet_classes/cd_fail2ban.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aconfig.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Adirs.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Afiles.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Ainstall.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aservice.html | 2 +- doc/puppet_classes/cd_fail2ban_3A_3Aparams.html | 10 ++++------ doc/top-level-namespace.html | 2 +- 12 files changed, 24 insertions(+), 16 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9fb548a..3819875 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Changelog of Git Changelog. No issue
+202c50762d6411e Arne Teuke 2017-08-03 14:29:17 ++
added controls for main conf/local files
+ + +a22f3fb29e72361 Jenkins Server 2017-08-03 14:28:57 ++
recommit for updates in build 7
+ + 3fdfda26d55dc96 Jenkins Server 2017-08-03 13:10:45
recommit for updates in build 6
diff --git a/doc/_index.html b/doc/_index.html index b21ade1..91e691c 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -132,7 +132,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index 1a1160e..e9ef17a 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -251,7 +251,7 @@ environments. diff --git a/doc/index.html b/doc/index.html index e8815cd..78f1e28 100644 --- a/doc/index.html +++ b/doc/index.html @@ -251,7 +251,7 @@ environments. diff --git a/doc/puppet_classes/cd_fail2ban.html b/doc/puppet_classes/cd_fail2ban.html index d998ea2..18aa670 100644 --- a/doc/puppet_classes/cd_fail2ban.html +++ b/doc/puppet_classes/cd_fail2ban.html @@ -139,7 +139,7 @@ class cd_fail2ban { diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html index 086a584..dba1c5b 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html @@ -153,7 +153,7 @@ class cd_fail2ban::main::config ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html index 4adb85a..715de5b 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html @@ -350,7 +350,7 @@ class cd_fail2ban::main::dirs ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html index 67c717c..d964416 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html @@ -222,7 +222,7 @@ class cd_fail2ban::main::files ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html index 0abcedc..e676cd0 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html @@ -159,7 +159,7 @@ class cd_fail2ban::main::install ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html index 3fdc1a7..16fb887 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html @@ -166,7 +166,7 @@ class cd_fail2ban::main::service ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html b/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html index 00d5aa6..db1e012 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html @@ -394,8 +394,7 @@ from the database. 92 93 94 -95 -96
# File 'manifests/params.pp', line 48 @@ -425,7 +424,6 @@ $reqpackages = $::operatingsystem ? { } - # service $fn_service = 'fail2ban' @@ -439,9 +437,9 @@ $fn_var_lib_dir = '/var/lib/fail2ban' $fn_var_run_dir = '/var/run/fail2ban' # files -$fn_fail2ban_conf_file = "${fn_main_dir}fail2ban.conf" +$fn_fail2ban_conf_file = "${fn_main_dir}/fail2ban.conf" $fn_fail2ban_conf_erb = 'cd_fail2ban/fail2ban_conf.erb' -$fn_fail2ban_local_file = "${fn_main_dir}fail2ban.local" +$fn_fail2ban_local_file = "${fn_main_dir}/fail2ban.local" $fn_fail2ban_local_erb = 'cd_fail2ban/fail2ban_local.erb' # includes must be last @@ -456,7 +454,7 @@ $fn_fail2ban_local_erb = 'cd_fail2ban/fail2ban_local.erb' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 0410a43..0b3dca7 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@ From 6f0942201f20c664fb7e072592fa60b64768eb3c Mon Sep 17 00:00:00 2001 From: Jenkins Server+64 +65 +66 +67 +68 +69 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96Date: Thu, 3 Aug 2017 16:55:39 +0200 Subject: [PATCH 5/7] recommit for updates in build 9 --- CHANGELOG.md | 10 ++++++++++ doc/_index.html | 2 +- doc/file.README.html | 2 +- doc/index.html | 2 +- doc/puppet_classes/cd_fail2ban.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aconfig.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Adirs.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Afiles.html | 4 ++-- .../cd_fail2ban_3A_3Amain_3A_3Ainstall.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aservice.html | 2 +- doc/puppet_classes/cd_fail2ban_3A_3Aparams.html | 2 +- doc/top-level-namespace.html | 2 +- 12 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3819875..28fa7a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Changelog of Git Changelog. No issue
+8c3df7530a1ab21 Arne Teuke 2017-08-03 14:51:29 ++
added controls for main conf/local files
+ + +21086d1f714fd6a Jenkins Server 2017-08-03 14:51:10 ++
recommit for updates in build 8
+ + 202c50762d6411e Arne Teuke 2017-08-03 14:29:17
added controls for main conf/local files
diff --git a/doc/_index.html b/doc/_index.html index 91e691c..e075b08 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -132,7 +132,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index e9ef17a..9f3f7fd 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -251,7 +251,7 @@ environments. diff --git a/doc/index.html b/doc/index.html index 78f1e28..b84eafc 100644 --- a/doc/index.html +++ b/doc/index.html @@ -251,7 +251,7 @@ environments. diff --git a/doc/puppet_classes/cd_fail2ban.html b/doc/puppet_classes/cd_fail2ban.html index 18aa670..6201a8d 100644 --- a/doc/puppet_classes/cd_fail2ban.html +++ b/doc/puppet_classes/cd_fail2ban.html @@ -139,7 +139,7 @@ class cd_fail2ban { diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html index dba1c5b..cb03150 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html @@ -153,7 +153,7 @@ class cd_fail2ban::main::config ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html index 715de5b..e36bd45 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html @@ -350,7 +350,7 @@ class cd_fail2ban::main::dirs ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html index d964416..1ba7621 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html @@ -209,7 +209,7 @@ class cd_fail2ban::main::files ( selrole => object_r, seltype => etc_t, seluser => system_u, - content => template($fn_fail2ban_conf_erb), + content => template($fn_fail2ban_local_erb), notify => Service[$fn_service], } @@ -222,7 +222,7 @@ class cd_fail2ban::main::files ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html index e676cd0..5f1664b 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html @@ -159,7 +159,7 @@ class cd_fail2ban::main::install ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html index 16fb887..5837fb0 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html @@ -166,7 +166,7 @@ class cd_fail2ban::main::service ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html b/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html index db1e012..6e53153 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html @@ -454,7 +454,7 @@ $fn_fail2ban_local_erb = 'cd_fail2ban/fail2ban_local.erb' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 0b3dca7..4af7cea 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@ From 1b33e2a2105237c5e4547174794006a8dedab9c6 Mon Sep 17 00:00:00 2001 From: Jenkins ServerDate: Thu, 3 Aug 2017 18:32:58 +0200 Subject: [PATCH 6/7] recommit for updates in build 12 --- CHANGELOG.md | 10 + REPOSTRUCTURE.md | 6 +- doc/_index.html | 2 +- doc/file.README.html | 4 +- doc/index.html | 4 +- doc/puppet_classes/cd_fail2ban.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aconfig.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Adirs.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Afiles.html | 68 ++- .../cd_fail2ban_3A_3Amain_3A_3Ainstall.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aservice.html | 2 +- .../cd_fail2ban_3A_3Aparams.html | 547 ++++++++++++++++-- doc/top-level-namespace.html | 2 +- tests/UTF_Files | 1 + 14 files changed, 587 insertions(+), 67 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 28fa7a9..192962c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,16 @@ Changelog of Git Changelog. No issue
+cb4b482e20b2be5 Arne Teuke 2017-08-03 14:56:00 ++
fixed controls for main conf/local files
+ + +6f0942201f20c66 Jenkins Server 2017-08-03 14:55:39 ++
recommit for updates in build 9
+ + 8c3df7530a1ab21 Arne Teuke 2017-08-03 14:51:29
added controls for main conf/local files
diff --git a/REPOSTRUCTURE.md b/REPOSTRUCTURE.md index 3ce4a87..80a0b90 100644 --- a/REPOSTRUCTURE.md +++ b/REPOSTRUCTURE.md @@ -33,7 +33,9 @@ | `-- params.pp |-- templates | |-- fail2ban_conf.erb -| `-- fail2ban_local.erb +| |-- fail2ban_local.erb +| |-- jail_conf.erb +| `-- jail_local.erb |-- tests | `-- UTF_Files |-- CHANGELOG.md @@ -44,4 +46,4 @@ |-- README.md `-- REPOSTRUCTURE.md -8 directories, 36 files +8 directories, 38 files diff --git a/doc/_index.html b/doc/_index.html index e075b08..a84ecc4 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -132,7 +132,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index 9f3f7fd..026d4df 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -61,7 +61,7 @@|Repo Name| version | Build Status| |---|---|---|---| -|
@@ -251,7 +251,7 @@ environments. diff --git a/doc/index.html b/doc/index.html index b84eafc..c844152 100644 --- a/doc/index.html +++ b/doc/index.html @@ -61,7 +61,7 @@cd_fail2ban| 0.0.0.4 | cd_fail2ban| 0.0.0.5 | {Build Status/]||Repo Name| version | Build Status| |---|---|---|---| -|
@@ -251,7 +251,7 @@ environments. diff --git a/doc/puppet_classes/cd_fail2ban.html b/doc/puppet_classes/cd_fail2ban.html index 6201a8d..98cca7e 100644 --- a/doc/puppet_classes/cd_fail2ban.html +++ b/doc/puppet_classes/cd_fail2ban.html @@ -139,7 +139,7 @@ class cd_fail2ban { diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html index cb03150..e0aa07f 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html @@ -153,7 +153,7 @@ class cd_fail2ban::main::config ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html index e36bd45..2d811b7 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html @@ -350,7 +350,7 @@ class cd_fail2ban::main::dirs ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html index 1ba7621..97bae40 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html @@ -168,7 +168,39 @@ href="http://www.gnu.org/licenses">www.gnu.org/licenses/. 61 62 63 -64cd_fail2ban| 0.0.0.4 | cd_fail2ban| 0.0.0.5 | {Build Status/]|
# File 'manifests/main/files.pp', line 23
@@ -213,6 +245,38 @@ class cd_fail2ban::main::files (
notify => Service[$fn_service],
}
+ # manage jail.conf
+
+ file { $fn_jail_conf_file:
+ ensure => present,
+ path => $fn_jail_conf_file,
+ owner => 'root',
+ group => 'root',
+ mode => '0640',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ content => template($fn_jail_conf_erb),
+ notify => Service[$fn_service],
+ }
+
+ # manage jail.local
+
+ file { $fn_jail_local_file:
+ ensure => present,
+ path => $fn_jail_local_file,
+ owner => 'root',
+ group => 'root',
+ mode => '0640',
+ selrange => s0,
+ selrole => object_r,
+ seltype => etc_t,
+ seluser => system_u,
+ content => template($fn_jail_local_erb),
+ notify => Service[$fn_service],
+ }
+
}
}
age in seconds at which bans should be purged from the database.
+can be an IP address, a CIDR mask or a DNS host. +Fail2ban will not ban a +host which matches an address in this list. Several +addresses can be +defined using space (and/or comma) separator.
+External command that will take an +tagged arguments to ignore, e.g. +<ip>,and return true if the IP is to be +ignored. False otherwise.
+number of seconds that a host is banned.
+A host is banned if it has generated “maxretry” +during the last +"findtime" seconds.
+number of failures before a host get banned.
+specifies the backend used to get files +modification. options are +"pyinotify", "gamin", "polling", +"systemd" and +"auto". +pyinotify: requires pyinotify (a +file alteration monitor) to be installed. + If pyinotify is not installed, +Fail2ban will use auto. +gamin: requires Gamin (a file alteration monitor) +to be installed. + If Gamin is not installed, Fail2ban will use +auto. +polling: uses a polling algorithm which does not require external +libraries. +systemd: uses systemd python library to access the systemd +journal. + Specifying "logpath" is not valid for this backend. + +See "journalmatch" in the jails associated filter config +auto: +will try to use the following backends, in order: + pyinotify, gamin, +polling.
+specifies if jails should trust hostnames in logs, +warn when DNS lookups +are performed, or ignore all hostnames in logs +yes: if a hostname is +encountered, a DNS lookup will be performed. +warn: if a hostname is +encountered, a DNS lookup will be performed, + but it will be logged as a +warning. +no: if a hostname is encountered, will not be used for banning, + +but it will be logged as info. +raw: use raw value (no hostname), allow use +it for no-host filters/actions +(example user)
+specifies the encoding of the log files +handled by the jail This is used to +decode the lines from the log file. +Typical examples: "ascii", +"utf-8" +auto: will use the system locale setting
+enables the jails. +By default all jails are disabled, and it should stay +this way. +Enable only relevant to your setup jails in your .local or +jail.d/*.conf +true: jail will be enabled and log files will get monitored +for changes +false: jail is not enabled
+defines the filter to use by the jail. +By default jails have names matching +their filter name
+Destination email address used solely for the +interpolations in +jail.conf,local,d/* configuration files.
+Sender email address used solely for some actions
+E-mail action. Since 0.8.1 Fail2Ban uses sendmail MTA +for the mailing. +Change mta configuration parameter to mail if you want to +revert to +conventional 'mail'.
+Default protocol.
+Specify chain where jumps would need to be added in +iptables-* actions.
+in a particular jail
+Format of user-agent +tools.ietf.org/html/rfc7231#section-5.5.3
-48 -49 -50 -51 -52 -53 -54 -55 -56 -57 -58 -59 -60 -61 -62 -63 -64 -65 -66 -67 -68 -69 -70 -71 -72 -73 -74 -75 -76 -77 -78 -79 -80 -81 -82 -83 -84 -85 -86 -87 -88 -89 -90 -91 -92 -93 -94 -95+104 +105 +106 +107 +108 +109 +110 +111 +112 +113 +114 +115 +116 +117 +118 +119 +120 +121 +122 +123 +124 +125 +126 +127 +128 +129 +130 +131 +132 +133 +134 +135 +136 +137 +138 +139 +140 +141 +142 +143 +144 +145 +146 +147 +148 +149 +150 +151 +152 +153 +154 +155 +156 +157 +158 +159 +160 +161 +162 +163 +164 +165 +166 +167 +168 +169 +170 +171 +172 +173 +174 +175 +176 +177 +178 +179 +180 +181 +182 +183 +184
# File 'manifests/params.pp', line 48 +# File 'manifests/params.pp', line 104 class cd_fail2ban::params ( @@ -405,6 +815,9 @@ $pkg_ensure = 'latest', $fn_manage_config = true, $fn_enable_service = 'running', + +# fail2ban.conf/local + $fn_loglevel = 'INFO', $fn_logtarget = 'SYSLOG', $fn_syslogsocket = 'auto', @@ -413,16 +826,41 @@ $fn_pidfile = '/var/run/fail2ban/fail2ban.pid', $fn_dbfile = '/var/lib/fail2ban/fail2ban.sqlite3', $fn_dbpurgeage = '86400', +# jail.conf/local +$fn_ignoreip = '127.0.0.1/8', +$fn_ignorecommand = '', +$fn_bantime = '600', +$fn_findtime = '600', +$fn_maxretry = '5', +$fn_backend = 'auto', +$fn_usedns = 'warn', +$fn_logencoding = 'auto', +$fn_enabled = 'false', +$fn_filter = '%(__name__)s', +$fn_destemail = 'root@localhost', +$fn_sender = 'root@localhost', +$fn_mta = 'sendmail', +$fn_protocol = 'tcp', +$fn_chain = 'INPUT', +$fn_port = '0:65535', +$fn_fail2ban_agent = 'Fail2Ban/%(fail2ban_version)s', + ) { # installation section -$reqpackages = $::operatingsystem ? { +$reqpackages = $::operatingsystem ? { /(?i-mx:centos|fedora|redhat)/ => ['fail2ban','fail2ban-firewalld', 'fail2ban-sendmail', - 'fail2ban-server.noarch'], + 'fail2ban-server.noarch','jwhois'], } +$fn_jail_paths = $::operatingsystem ? { + /(?i-mx:centos|fedora|redhat)/ => 'fedora', + } + +# shortcuts +$fn_os = $::operatingsystem # service $fn_service = 'fail2ban' @@ -441,6 +879,11 @@ $fn_fail2ban_conf_file = "${fn_main_dir}/fail2ban.conf" $fn_fail2ban_conf_erb = 'cd_fail2ban/fail2ban_conf.erb' $fn_fail2ban_local_file = "${fn_main_dir}/fail2ban.local" $fn_fail2ban_local_erb = 'cd_fail2ban/fail2ban_local.erb' +$fn_jail_conf_file = "${fn_main_dir}/jail.conf" +$fn_jail_conf_erb = 'cd_fail2ban/jail_conf.erb' +$fn_jail_local_file = "${fn_main_dir}/jail.local" +$fn_jail_local_erb = 'cd_fail2ban/jail_local.erb' + # includes must be last @@ -454,7 +897,7 @@ $fn_fail2ban_local_erb = 'cd_fail2ban/fail2ban_local.erb' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 4af7cea..136fa21 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@ diff --git a/tests/UTF_Files b/tests/UTF_Files index a138597..4319827 100644 --- a/tests/UTF_Files +++ b/tests/UTF_Files @@ -4,3 +4,4 @@ ./.yardoc/objects/root.dat: data ./doc/css/style.css: HTML document, UTF-8 Unicode text, with very long lines ./doc/js/jquery.js: HTML document, UTF-8 Unicode text, with very long lines +./doc/puppet_classes/cd_fail2ban_3A_3Aparams.html: HTML document, UTF-8 Unicode text From 19cf115fce3293d3cd011257760b95c74ea3f362 Mon Sep 17 00:00:00 2001 From: Jenkins ServerDate: Sun, 6 Aug 2017 17:07:25 +0200 Subject: [PATCH 7/7] recommit for updates in build 21 --- CHANGELOG.md | 20 ++ doc/_index.html | 2 +- doc/file.README.html | 2 +- doc/index.html | 2 +- doc/puppet_classes/cd_fail2ban.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aconfig.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Adirs.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Afiles.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Ainstall.html | 2 +- .../cd_fail2ban_3A_3Amain_3A_3Aservice.html | 2 +- .../cd_fail2ban_3A_3Aparams.html | 338 +++++++++++++++--- doc/top-level-namespace.html | 2 +- 12 files changed, 317 insertions(+), 61 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 192962c..399a14e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,26 @@ Changelog of Git Changelog. No issue
+df59c3e85d59b32 Arne Teuke 2017-08-03 16:33:22 ++
added more file controls
+ + +1b33e2a2105237c Jenkins Server 2017-08-03 16:32:58 ++
recommit for updates in build 12
+ + +d33c85b30d815d8 Arne Teuke 2017-08-03 16:29:36 ++
added more file controls
+ + +e4cfd9c5663c0e2 Arne Teuke 2017-08-03 16:25:10 ++
added more file controls
+ + cb4b482e20b2be5 Arne Teuke 2017-08-03 14:56:00
fixed controls for main conf/local files
diff --git a/doc/_index.html b/doc/_index.html index a84ecc4..7d7f332 100644 --- a/doc/_index.html +++ b/doc/_index.html @@ -132,7 +132,7 @@ diff --git a/doc/file.README.html b/doc/file.README.html index 026d4df..88f8336 100644 --- a/doc/file.README.html +++ b/doc/file.README.html @@ -251,7 +251,7 @@ environments. diff --git a/doc/index.html b/doc/index.html index c844152..38cd58d 100644 --- a/doc/index.html +++ b/doc/index.html @@ -251,7 +251,7 @@ environments. diff --git a/doc/puppet_classes/cd_fail2ban.html b/doc/puppet_classes/cd_fail2ban.html index 98cca7e..c09a4e7 100644 --- a/doc/puppet_classes/cd_fail2ban.html +++ b/doc/puppet_classes/cd_fail2ban.html @@ -139,7 +139,7 @@ class cd_fail2ban { diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html index e0aa07f..65525c6 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aconfig.html @@ -153,7 +153,7 @@ class cd_fail2ban::main::config ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html index 2d811b7..8066fa6 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Adirs.html @@ -350,7 +350,7 @@ class cd_fail2ban::main::dirs ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html index 97bae40..1c4a982 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Afiles.html @@ -286,7 +286,7 @@ class cd_fail2ban::main::files ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html index f22bf7c..a3c4a1e 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Ainstall.html @@ -159,7 +159,7 @@ class cd_fail2ban::main::install ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html index dae961d..a3ec0af 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Amain_3A_3Aservice.html @@ -166,7 +166,7 @@ class cd_fail2ban::main::service ( diff --git a/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html b/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html index 58144fa..f266486 100644 --- a/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html +++ b/doc/puppet_classes/cd_fail2ban_3A_3Aparams.html @@ -128,7 +128,9 @@ for more details. with this program. If not, see www.gnu.org/licenses/.CRITICAL,ERROR,WARNING,NOTICE,INFO-andDEBUG. +andDEBUG. + @param [string] Report ban via badips.com, and use +as blacklist @@ -537,10 +539,10 @@ auto: will use the system locale setting fn_enabled - (string) + (boolean) - (defaults to: 'false') + (defaults to: false) — @@ -714,6 +716,212 @@ href="https://tools.ietf.org/html/rfc7231#section-5.5.3">tools.ietf.org/html/rfc ++ + fn_banaction + + + (string) + + + (defaults to: 'iptables-multiport') + + + — + + +++ +Default banning action
++ + fn_banaction_allports + + + (string) + + + (defaults to: 'iptables-allports') + + + — + + +++ +Default banning action
++ + fn_action_ + + + (string) + + + (defaults to: '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]') + + + — + + +++ +ban only
++ + fn_action_mw + + + (string) + + + (defaults to: '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"] + %(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]') + + + — + + +++ +ban & send an e-mail with whois report to the +destemail.
++ + fn_action_mwl + + + (string) + + + (defaults to: '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"] + %(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]') + + + — + + +++ +ban & send an e-mail with whois report and +relevant log lines
++ + fn_action_xarf + + + (string) + + + (defaults to: '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"] + xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath=%(logpath)s, port="%(port)s"]') + + + — + + +++ +ban & send a xarf e-mail to abuse contact of +IP address and include +relevant log lines.
++ + fn_action_cf_mwl + + + (string) + + + (defaults to: 'cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"] + %(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]') + + + — + + +++ +ban IP on CloudFlare & send an e-mail with +whois report and relevant +log lines.
++ + fn_action_blocklist_de + + + (string) + + + (defaults to: 'blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"]') + + + — + + +++ +Report block via blocklist.de fail2ban +reporting service API
++ + fn_action_badips_report + + + (string) + + + (defaults to: 'badips[category="%(__name__)s", agent="%(fail2ban_agent)s"]') + + + — + + +++ +Report ban via badips.com
+ +(uses action.d/badips.conf for reporting only).
++ + fn_default_action + + + (string) + + + (defaults to: 'action_') + + + — + + +++ +Choose default action.
++ + fn_action_badips + + + (Any) + + + (defaults to: 'badips.py[category="%(__name__)s", banaction="%(banaction)s", agent="%(fail2ban_agent)s"]') + + + + @@ -724,23 +932,6 @@ href="https://tools.ietf.org/html/rfc7231#section-5.5.3">tools.ietf.org/html/rfc-104 -105 -106 -107 -108 -109 -110 -111 -112 -113 -114 -115 -116 -117 -118 -119 -120 121 122 123 @@ -804,47 +995,92 @@ href="https://tools.ietf.org/html/rfc7231#section-5.5.3">tools.ietf.org/html/rfc 181 182 183 -184+184 +185 +186 +187 +188 +189 +190 +191 +192 +193 +194 +195 +196 +197 +198 +199 +200 +201 +202 +203 +204 +205 +206 +207 +208 +209 +210 +211 +212 +213 +214 +215
# File 'manifests/params.pp', line 104 +# File 'manifests/params.pp', line 121 class cd_fail2ban::params ( -$pkg_ensure = 'latest', +$pkg_ensure = 'latest', -$fn_manage_config = true, -$fn_enable_service = 'running', +$fn_manage_config = true, +$fn_enable_service = 'running', # fail2ban.conf/local -$fn_loglevel = 'INFO', -$fn_logtarget = 'SYSLOG', -$fn_syslogsocket = 'auto', -$fn_socket = '/var/run/fail2ban/fail2ban.sock', -$fn_pidfile = '/var/run/fail2ban/fail2ban.pid', -$fn_dbfile = '/var/lib/fail2ban/fail2ban.sqlite3', -$fn_dbpurgeage = '86400', +$fn_loglevel = 'INFO', +$fn_logtarget = 'SYSLOG', +$fn_syslogsocket = 'auto', +$fn_socket = '/var/run/fail2ban/fail2ban.sock', +$fn_pidfile = '/var/run/fail2ban/fail2ban.pid', +$fn_dbfile = '/var/lib/fail2ban/fail2ban.sqlite3', +$fn_dbpurgeage = '86400', # jail.conf/local -$fn_ignoreip = '127.0.0.1/8', -$fn_ignorecommand = '', -$fn_bantime = '600', -$fn_findtime = '600', -$fn_maxretry = '5', -$fn_backend = 'auto', -$fn_usedns = 'warn', -$fn_logencoding = 'auto', -$fn_enabled = 'false', -$fn_filter = '%(__name__)s', -$fn_destemail = 'root@localhost', -$fn_sender = 'root@localhost', -$fn_mta = 'sendmail', -$fn_protocol = 'tcp', -$fn_chain = 'INPUT', -$fn_port = '0:65535', -$fn_fail2ban_agent = 'Fail2Ban/%(fail2ban_version)s', - +$fn_ignoreip = '127.0.0.1/8', +$fn_ignorecommand = '', +$fn_bantime = '600', +$fn_findtime = '600', +$fn_maxretry = '5', +$fn_backend = 'auto', +$fn_usedns = 'warn', +$fn_logencoding = 'auto', +$fn_enabled = false, +$fn_filter = '%(__name__)s', +$fn_destemail = 'root@localhost', +$fn_sender = 'root@localhost', +$fn_mta = 'sendmail', +$fn_protocol = 'tcp', +$fn_chain = 'INPUT', +$fn_port = '0:65535', +$fn_fail2ban_agent = 'Fail2Ban/%(fail2ban_version)s', +$fn_banaction = 'iptables-multiport', +$fn_banaction_allports = 'iptables-allports', +$fn_action_ = '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"]', +$fn_action_mw = '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"] + %(mta)s-whois[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", protocol="%(protocol)s", chain="%(chain)s"]', +$fn_action_mwl = '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"] + %(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]', +$fn_action_xarf = '%(banaction)s[name=%(__name__)s, bantime="%(bantime)s", port="%(port)s", protocol="%(protocol)s", chain="%(chain)s"] + xarf-login-attack[service=%(__name__)s, sender="%(sender)s", logpath=%(logpath)s, port="%(port)s"]', +$fn_action_cf_mwl = 'cloudflare[cfuser="%(cfemail)s", cftoken="%(cfapikey)s"] + %(mta)s-whois-lines[name=%(__name__)s, sender="%(sender)s", dest="%(destemail)s", logpath=%(logpath)s, chain="%(chain)s"]', +$fn_action_blocklist_de = 'blocklist_de[email="%(sender)s", service=%(filter)s, apikey="%(blocklist_de_apikey)s", agent="%(fail2ban_agent)s"]', +$fn_action_badips = 'badips.py[category="%(__name__)s", banaction="%(banaction)s", agent="%(fail2ban_agent)s"]', +$fn_action_badips_report = 'badips[category="%(__name__)s", agent="%(fail2ban_agent)s"]', +$fn_default_action = 'action_', ) { @@ -897,7 +1133,7 @@ $fn_jail_local_erb = 'cd_fail2ban/jail_local.erb' diff --git a/doc/top-level-namespace.html b/doc/top-level-namespace.html index 136fa21..f69125f 100644 --- a/doc/top-level-namespace.html +++ b/doc/top-level-namespace.html @@ -90,7 +90,7 @@