summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorgy Yakovlev <gyakovlev@gentoo.org>2019-03-25 14:56:38 -0700
committerGeorgy Yakovlev <gyakovlev@gentoo.org>2019-03-25 14:57:22 -0700
commitd838e64623453aa3ec106d76b34509327d583066 (patch)
tree28ad76273aabf92ad61c75f931d425ce250745c5 /net-misc/endlessh/files
parentapp-editors/gvim: apply #669306 fix to gvim ebuilds. (diff)
downloadgentoo-d838e64623453aa3ec106d76b34509327d583066.tar.gz
gentoo-d838e64623453aa3ec106d76b34509327d583066.tar.bz2
gentoo-d838e64623453aa3ec106d76b34509327d583066.zip
net-misc/endlessh: new package, ssh tarpit service
Package-Manager: Portage-2.3.62, Repoman-2.3.12 Signed-off-by: Georgy Yakovlev <gyakovlev@gentoo.org>
Diffstat (limited to 'net-misc/endlessh/files')
-rw-r--r--net-misc/endlessh/files/endlessh.confd22
-rwxr-xr-xnet-misc/endlessh/files/endlessh.initd22
-rw-r--r--net-misc/endlessh/files/logrotated7
3 files changed, 51 insertions, 0 deletions
diff --git a/net-misc/endlessh/files/endlessh.confd b/net-misc/endlessh/files/endlessh.confd
new file mode 100644
index 000000000000..a114889c8cac
--- /dev/null
+++ b/net-misc/endlessh/files/endlessh.confd
@@ -0,0 +1,22 @@
+# /etc/conf.d/endlessh: config file for /etc/init.d/endlessh
+#
+#ENDLESSH_ARGS=""
+#
+# -d INT Message millisecond delay [10000]
+# -f Set and load config file [/etc/endlessh/config]
+# -l INT Maximum banner line length (3-255) [32]
+# -m INT Maximum number of clients [4096]
+# -p INT Listening port [2222]
+# -v Print diagnostics to standard output (repeatable)
+
+# EXAMPLE: listen on port 22, log all queries and errors in very verbose mode
+
+#ENDLESSH_ARGS="-p 22 -vv"
+
+# plain file (preferred), change logrotate file as well if you change this.
+#output_log=/var/log/"${RC_SVCNAME}.log"
+#error_log=/var/log/"${RC_SVCNAME}.error.log"
+
+# syslog support via LOGGER(1). Note this spawns logger processes per io stream
+#output_logger="logger -p daemon.none --"
+#error_logger="logger -p daemon.err --"
diff --git a/net-misc/endlessh/files/endlessh.initd b/net-misc/endlessh/files/endlessh.initd
new file mode 100755
index 000000000000..a88fd9c34c90
--- /dev/null
+++ b/net-misc/endlessh/files/endlessh.initd
@@ -0,0 +1,22 @@
+#!/sbin/openrc-run
+# Copyright 2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+depend() {
+ need localmount
+ use net
+}
+
+description="Starts endlessh tarpit"
+
+command="/usr/bin/endlessh"
+command_args="${ENDLESSH_ARGS}"
+command_background="true"
+extra_started_commands="reload"
+pidfile="/run/${RC_SVCNAME}.pid"
+
+reload() {
+ ebegin "Reloading ${RC_SVCNAME} configuration"
+ start-stop-daemon --exec $command --signal HUP
+ eend $?
+}
diff --git a/net-misc/endlessh/files/logrotated b/net-misc/endlessh/files/logrotated
new file mode 100644
index 000000000000..53c9efbfe873
--- /dev/null
+++ b/net-misc/endlessh/files/logrotated
@@ -0,0 +1,7 @@
+/var/log/endlessh.log /var/log/endlessh.error.log {
+ missingok
+ notifempty
+ postrotate
+ /etc/init.d/endlessh -q reload
+ endscript
+}