]> git.immae.eu Git - perso/Immae/Projets/Puppet.git/blobdiff - modules/base_configuration/manifests/init.pp
Add fail2ban
[perso/Immae/Projets/Puppet.git] / modules / base_configuration / manifests / init.pp
index 4c6ca1e155cd5d210644aade25a239ea74322aaf..f432e293b0f6d2c142bb792d36e83a2e3d6a58d1 100644 (file)
@@ -49,4 +49,28 @@ class base_configuration (
         'Subsystem'                       => 'sftp /usr/lib/openssh/sftp-server',
      }
   }
+
+  class { 'pacman':
+    color => true,
+  }
+
+  pacman::repo { 'multilib':
+    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
+  }
 }