summarylogtreecommitdiffstats
path: root/tcptunnel.service
diff options
context:
space:
mode:
Diffstat (limited to 'tcptunnel.service')
-rw-r--r--tcptunnel.service15
1 files changed, 15 insertions, 0 deletions
diff --git a/tcptunnel.service b/tcptunnel.service
new file mode 100644
index 00000000000..87d5baf1e80
--- /dev/null
+++ b/tcptunnel.service
@@ -0,0 +1,15 @@
+[Unit]
+Description=A simple TCP port forwarder.
+After=network.target network-online.target
+
+[Service]
+User=nobody
+Group=nobody
+EnvironmentFile=/etc/tcptunnel/tcptunnel.conf
+ExecStart=/usr/bin/tcptunnel --stay-alive --local-port=${LOCAL_PORT} --remote-port=${REMOTE_PORT} --remote-host=${REMOTE_HOST} '$ADDITIONAL_CMDLINE'
+KillMode=mixed
+CapabilityBoundingSet=CAP_NET_BIND_SERVICE
+AmbientCapabilities=CAP_NET_BIND_SERVICE
+
+[Install]
+WantedBy=multi-user.target