- Download release 2.1 for your architecture https://github.com/mmatczuk/go-http-tunnel/releases/tag/2.1
- Move
tunneld
to/usr/local/bin/tunneld
- Create user
useradd -r tunneld
- Create
/etc/tunneld
- Install Certstrap 1.1.1 to
/usr/local/bin/certstrap
- Download
generateCertificates.sh
andchmod +x generateCertificates.sh
- Generate your certificates
./generateCertificates.sh YOUR-CA-NAME hostname-of-your-tunnel-server,clientname1,clientname2
- You can always come back and generate additional certificates..
- Move the server certificate, server key and ca certificate to
/etc/tunneld
. Name themca.crt
,server.crt
andserver.key
- Download the
clients
file to/etc/tunneld/clients
chown -R tunneld:tunneld /etc/tunneld
- Download the
tunneld.service
to/etc/systemd/system/tunnel.service
- If you want http tunneling, change the parameters to
/usr/local/bin/tunneld
accordingly and maybe put the http stuff behind a proxy server (Caddy is perfect for this!)
- If you want http tunneling, change the parameters to
systemctl daemon-reload
systemctl enable tunneld
systemctl start tunneld
- Download https://github.com/mmatczuk/go-http-tunnel/releases/tag/2.1 matching your clients architecture
- Extract tunnel binary to
/usr/local/bin/tunnel
- Create user tunnel
useradd -r tunnel
- Create
/etc/tunnel
and copy tls certificate files there - Create
/etc/tunnel/tunnel.yml
(See exampletunnel.yml
) chown -R tunnel:tunnel /etc/tunnel
tunnel -config /etc/tunnel/tunnel.yml id
to show your client id, you have to add this one to the allowed clients (/etc/tunneld/clients
) on the server- Download
tunnel.service
to/etc/systemd/system/tunnel.service
systemctl enable tunnel
systemctl start tunnel
Hi, where could I get client.crt and client.key?