Merge pull request #23697 from sargon/master
sshguard + service: init at 2.0.0
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
From 11f0d238d3149c31c4440b8f6a58fe6a00b82d3a Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Aleksandersen <code@daniel.priv.no>
|
||||
Date: Mon, 13 Mar 2017 16:29:33 +0100
|
||||
Subject: [PATCH 1/3] Remove the unnecessary = from ipset cmds
|
||||
|
||||
---
|
||||
src/fw/sshg-fw-ipset.sh | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/fw/sshg-fw-ipset.sh b/src/fw/sshg-fw-ipset.sh
|
||||
index 510bc2c..dc7f86b 100644
|
||||
--- a/src/fw/sshg-fw-ipset.sh
|
||||
+++ b/src/fw/sshg-fw-ipset.sh
|
||||
@@ -3,8 +3,8 @@
|
||||
# This file is part of SSHGuard.
|
||||
|
||||
fw_init() {
|
||||
- ipset -quiet create -exist sshguard4 hash:ip family=inet
|
||||
- ipset -quiet create -exist sshguard6 hash:ip family=inet6
|
||||
+ ipset -quiet create -exist sshguard4 hash:ip family inet
|
||||
+ ipset -quiet create -exist sshguard6 hash:ip family inet6
|
||||
}
|
||||
|
||||
fw_block() {
|
||||
--
|
||||
2.10.0
|
||||
|
||||
32
pkgs/tools/security/sshguard/default.nix
Normal file
32
pkgs/tools/security/sshguard/default.nix
Normal file
@@ -0,0 +1,32 @@
|
||||
{ stdenv, fetchurl, autoreconfHook, yacc, flex}:
|
||||
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "2.0.0";
|
||||
name = "sshguard-${version}";
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://sourceforge/sshguard/sshguard-2.0.0.tar.gz";
|
||||
sha256 = "e87c6c4a6dddf06f440ea76464eb6197869c0293f0a60ffa51f8a6a0d7b0cb06";
|
||||
};
|
||||
|
||||
doCheck = true;
|
||||
|
||||
nativeBuildInputs = [ autoreconfHook yacc flex ];
|
||||
|
||||
configureFlags = [ "--sysconfdir=/etc" ];
|
||||
|
||||
patches = [ ./0001-Remove-the-unnecessary-from-ipset-cmds.patch ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "SSHGuard protects hosts from brute-force attacks";
|
||||
longDescription = ''
|
||||
SSHGuard can read log messages from various input sources. Log messages are parsed, line-by-line, for recognized patterns.
|
||||
If an attack, such as several login failures within a few seconds, is detected, the offending IP is blocked.
|
||||
'';
|
||||
homepage = https://sshguard.net;
|
||||
license = licenses.bsd3;
|
||||
maintainers = with maintainers; [ sargon ];
|
||||
platforms = with platforms; linux ++ darwin ++ freebsd ++ netbsd ++ openbsd;
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user