Skip to content

Instantly share code, notes, and snippets.

@SamDecrock
Created September 6, 2019 08:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SamDecrock/566decf922498ef6599ef2eed1b8b169 to your computer and use it in GitHub Desktop.
Save SamDecrock/566decf922498ef6599ef2eed1b8b169 to your computer and use it in GitHub Desktop.
[Unit]
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
User=samd
ExecStart=/usr/bin/socat tcp-listen:2022,reuseaddr,fork tcp:168.128.12.244:22
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=forward-gitlab
[Install]
WantedBy=multi-user.target
@SamDecrock
Copy link
Author

Listens on port 2022 and forwards everything to 168.128.12.244:22 on TCP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment