aboutsummaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorlns <matzeton@googlemail.com>2019-01-31 16:08:51 +0100
committerlns <matzeton@googlemail.com>2019-01-31 16:08:51 +0100
commit4f11b7b6a0778586be4f6c9c9754bae28e58cf55 (patch)
treee5d46ab1bf7688731562dec931f93191713afe14 /contrib
parentedf03c8199da3d28654626940bc16bdf66c6f86d (diff)
added systemd conf/service file
Signed-off-by: lns <matzeton@googlemail.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ptunnel-ng.conf30
-rw-r--r--contrib/ptunnel-ng.service20
2 files changed, 50 insertions, 0 deletions
diff --git a/contrib/ptunnel-ng.conf b/contrib/ptunnel-ng.conf
new file mode 100644
index 0000000..a85af0c
--- /dev/null
+++ b/contrib/ptunnel-ng.conf
@@ -0,0 +1,30 @@
+# Do not forget the '=' between options and values
+# for long options e.g. '--option=value'.
+# This is not required nor valid for short options e.g. '-o value'.
+
+#
+# required settings
+#
+
+# chroot to this dir
+PT_CHROOT="/var/lib/ptunnel"
+
+# change user/group
+PT_USER="nobody"
+PT_GROUP="nobody"
+
+#
+# optional settings
+#
+
+# authentication challenge (won't be visible in /proc/*/cmdline)
+#PT_PASSWD="--passwd=changeme"
+
+# magic value protocol identifier (fool IDS/IDP software)
+#PT_MAGIC="--magic=0x41414141"
+
+# destination ip
+#PT_DESTIP="--remote-addr=127.0.0.1"
+
+# destination port
+#PT_DESTPORT="--remote-port=22"
diff --git a/contrib/ptunnel-ng.service b/contrib/ptunnel-ng.service
new file mode 100644
index 0000000..3dae2a9
--- /dev/null
+++ b/contrib/ptunnel-ng.service
@@ -0,0 +1,20 @@
+[Unit]
+Description=PingTunnel NG Proxy/Server
+After=syslog.target
+
+[Service]
+Type=fork
+EnvironmentFile=/etc/conf.d/ptunnel-ng
+Environment="PT_CHROOT=${PT_CHROOT:/var/lib/ptunnel}"
+Environment="PT_USER=${PT_USER:nobody}"
+Environment="PT_GROUP=${PT_GROUP:nobody}"
+ExecStartPre=mkdir -p ${PT_CHROOT}
+ExecStartPre=chown ${PT_USER}:${PT_GROUP} ${PT_CHROOT}
+ExecStart=/usr/bin/ptunnel-ng \
+ --syslog \
+ --chroot=${PT_CHROOT} --user=${PT_USER} --group=${PT_GROUP} \
+ $PT_PASSWD $PT_MAGIC $PT_DESTIP $PT_DESTPORT
+Restart=on-abort
+
+[Install]
+WantedBy=multi-user.target