- Gen cert
openssl req -x509 -nodes -newkey rsa:2048 -sha256 -keyout client.key -out client.crt -subj "/C=US/ST=FL/L=Ocala/O=Company/CN=x.org"
- tunnel.service
[Unit]
Description=tunnel
Documentation=https://github.com/mmatczuk/go-http-tunnel
[Service]
Restart=always
RestartSec=30
ExecStart=/opt/tunnel/tunnel -config /opt/tunnel/local.yml start-all
# systemd.exec
ProtectHome=yes
ProtectSystem=full
[Install]
WantedBy=multi-user.target
- local.yml
tls_crt: /opt/tunnel/client.crt
tls_key: /opt/tunnel/client.key
server_addr: remote-server-address
tunnels:
ssh:
proto: tcp
addr: 127.0.0.1:22
remote_addr: 0.0.0.0:6622