summarylogtreecommitdiffstats
path: root/tcptunnel.service
diff options
context:
space:
mode:
authorTrumeet2020-07-23 19:27:28 -0700
committerTrumeet2020-07-23 19:27:28 -0700
commit1c74775996f352e8f854ad40df1ac3eaf0c6354c (patch)
tree20545150022427fd883832c92ee1907625b4a15c /tcptunnel.service
downloadaur-tcptunnel-git.tar.gz
First Commit
Signed-off-by: Trumeet <17158086+Trumeet@users.noreply.github.com>
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