diff options
Diffstat (limited to 'security/honeytrap/files')
-rw-r--r-- | security/honeytrap/files/etc/honeytrap.toml | 20 | ||||
-rw-r--r-- | security/honeytrap/files/honeytrap.in | 41 |
2 files changed, 61 insertions, 0 deletions
diff --git a/security/honeytrap/files/etc/honeytrap.toml b/security/honeytrap/files/etc/honeytrap.toml new file mode 100644 index 000000000000..91e71d5fd729 --- /dev/null +++ b/security/honeytrap/files/etc/honeytrap.toml @@ -0,0 +1,20 @@ +[listener] +type="socket" + +[service.ssh-simulator] +type="ssh-simulator" +credentials=["root:root", "root:password"] + +[[port]] +ports=["tcp/8022"] +services=["ssh-simulator"] + +[channel.console] +type="console" + +[[filter]] +channel=["console"] + +[[logging]] +output="/var/log/honeytrap/logging.log" +level="debug" diff --git a/security/honeytrap/files/honeytrap.in b/security/honeytrap/files/honeytrap.in new file mode 100644 index 000000000000..7c4e383026e7 --- /dev/null +++ b/security/honeytrap/files/honeytrap.in @@ -0,0 +1,41 @@ +#!/bin/sh + +# $FreeBSD$ +# +# PROVIDE: honeytrap +# REQUIRE: LOGIN +# KEYWORD: shutdown +# +# Add these lines to /etc/rc.conf.local or /etc/rc.conf +# to enable this service: +# +# honeytrap_enable (bool): Set to NO by default. +# Set it to YES to enable honeytrap. +# honeytrap_datadir (path): Set to %%PREFIX%%/var/lib/honeytrap +# by default. +# honeytrap_config (path): Set to %%PREFIX%%/etc/honeytrap.toml +# by default. + +. /etc/rc.subr + +name=honeytrap +rcvar=honeytrap_enable + +load_rc_config $name + +: ${honeytrap_enable:="NO"} +: ${honeytrap_datadir="%%PREFIX%%/var/lib/honeytrap"} +: ${honeytrap_config="%%PREFIX%%/etc/honeytrap.toml"} + +start_cmd="$name_start" + +honeytrap_program="%%PREFIX%%/bin/honeytrap" +honeytrap_flags="--data $honeytrap_datadir --config $honeytrap_config" +pidfile=/var/run/${name}.pid + +honeytrap_start() +{ + daemon -p $pidfile -u $name $honeytrap_program $honeytrap_flags +} + +run_rc_command "$1" |