Initial Commit

- initial default booting image
This commit is contained in:
2026-11-06 20:45:42 +01:00
commit b8783708ae
15201 changed files with 602532 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
config BR2_PACKAGE_SSHGUARD
bool "sshguard"
depends on BR2_TOOLCHAIN_HAS_THREADS
select BR2_PACKAGE_IPTABLES # runtime
help
sshguard protects hosts from brute-force attacks against SSH
and other services. It aggregates system logs and blocks
repeat offenders using one of several firewall backends,
including iptables, ipfw, and pf.
https://www.sshguard.net
comment "sshguard needs a toolchain w/ threads"
depends on !BR2_TOOLCHAIN_HAS_THREADS

View File

@@ -0,0 +1,49 @@
#!/bin/sh
DAEMON="sshguard"
PIDFILE="/var/run/$DAEMON.pid"
start() {
printf 'Starting %s: ' "$DAEMON"
iptables -L sshguard > /dev/null 2>&1 || \
(iptables -N sshguard && iptables -A INPUT -j sshguard)
start-stop-daemon -S -q -b -p /run/sshguard.pid \
-x /usr/sbin/sshguard -- -i /run/sshguard.pid
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
stop() {
printf 'Stopping %s: ' "$DAEMON"
start-stop-daemon -K -q -p "$PIDFILE"
status=$?
if [ "$status" -eq 0 ]; then
rm -f "$PIDFILE"
echo "OK"
else
echo "FAIL"
fi
return "$status"
}
restart() {
stop
sleep 1
start
}
case "$1" in
start|stop|restart)
"$1";;
reload)
# Restart, since there is no true "reload" feature.
restart;;
*)
echo "Usage: $0 {start|stop|restart|reload}"
exit 1
esac

View File

@@ -0,0 +1,4 @@
# sha256 from https://sourceforge.net/projects/sshguard/files/sshguard/2.5.1/sshguard-2.5.1.sha256
sha256 997a1e0ec2b2165b4757c42f8948162eb534183946af52efc406885d97cb89fc sshguard-2.5.1.tar.gz
# Locally calculated
sha256 c3ae64f12153a1bc55bc234d09f40a08ab0e0149fffc972c0b7f02d5a12c1a5c COPYING

View File

@@ -0,0 +1,32 @@
################################################################################
#
# sshguard
#
################################################################################
SSHGUARD_VERSION = 2.5.1
SSHGUARD_SITE = https://sourceforge.net/projects/sshguard/files/sshguard/$(SSHGUARD_VERSION)
SSHGUARD_LICENSE = ISC, Public Domain (fnv hash), BSD-3-Clause (SimCList)
SSHGUARD_LICENSE_FILES = COPYING
define SSHGUARD_INSTALL_CONFIG
$(INSTALL) -D -m 0644 $(@D)/examples/sshguard.conf.sample \
$(TARGET_DIR)/etc/sshguard.conf
$(SED) '/^#BACKEND/c\BACKEND="/usr/libexec/sshg-fw-iptables"' \
-e '/^#FILES/c\FILES="/var/log/messages"' $(TARGET_DIR)/etc/sshguard.conf
endef
SSHGUARD_POST_INSTALL_TARGET_HOOKS += SSHGUARD_INSTALL_CONFIG
define SSHGUARD_INSTALL_INIT_SYSV
$(INSTALL) -D -m 755 package/sshguard/S49sshguard \
$(TARGET_DIR)/etc/init.d/S49sshguard
endef
define SSHGUARD_INSTALL_INIT_SYSTEMD
$(INSTALL) -D -m 0644 $(@D)/examples/sshguard.service \
$(TARGET_DIR)/usr/lib/systemd/system/sshguard.service
$(SED) 's:/usr/local/sbin/sshguard:/usr/sbin/sshguard:g' \
$(TARGET_DIR)/usr/lib/systemd/system/sshguard.service
endef
$(eval $(autotools-package))