]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/commitdiff
Add fail2ban
authorIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 10 Aug 2016 11:27:09 +0000 (13:27 +0200)
committerIsmaël Bouya <ismael.bouya@normalesup.org>
Wed, 10 Aug 2016 19:37:59 +0000 (21:37 +0200)
.gitmodules
modules/base_configuration/manifests/init.pp
modules/fail2ban [new submodule]

index 3a8bbe0d2a42cacc973f01834a56d32a9140a6d6..5310ea7f0bcfcd7852c07358b0709d9599a0cd91 100644 (file)
@@ -19,6 +19,6 @@
 [submodule "modules/puppetlabs_concat"]
        path = modules/concat
        url = https://github.com/puppetlabs/puppetlabs-concat.git
-[submodule "modules/pacman"]
-       path = modules/pacman
-       url = https://github.com/aboe76/puppet-pacman.git
+[submodule "modules/fail2ban"]
+       path = modules/fail2ban
+       url = git://git.immae.eu/github/lelutin/puppet-fail2ban
index dca17b34965cb39e09f0dea873b12e44709253d8..f432e293b0f6d2c142bb792d36e83a2e3d6a58d1 100644 (file)
@@ -58,4 +58,19 @@ class base_configuration (
     order   => 15,
     include => '/etc/pacman.d/mirrorlist'
   }
+
+  ensure_packages(["whois"], { 'install_options' => '--asdeps' })
+  class { 'fail2ban':
+    logtarget => 'SYSLOG',
+    backend   => 'systemd'
+  }
+  fail2ban::jail { 'sshd':
+    backend  => 'systemd',
+    port     => 'ssh',
+    filter   => 'sshd',
+    maxretry => 10,
+    bantime  => 86400,
+    logpath  => '',
+    order    => 10
+  }
 }
diff --git a/modules/fail2ban b/modules/fail2ban
new file mode 160000 (submodule)
index 0000000..40b2dc4
--- /dev/null
@@ -0,0 +1 @@
+Subproject commit 40b2dc48cfe7bc44cf8d85887614482892f39a69