I think a better option would be to create a Wireguard tunnel between Raspberry Pi and the remote server instead of a SSH Tunnel. Then there is no need to add or change ports and restart the tunnel for every service.
OP's solution sound good enough for their needs. Solutions can always be improved, but it's not always worth doing that.
Putting Raspberry Pi Online with Caddy and SSH Tunnel
11–20 of 157 posts
Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#12H2O web server seems to be faster than nginx , litespeed and supports http1/http2/http3 . It's config file is yaml file.
For HTTPS, i recommend https://acme.sh . It's very very easy and autorenews certificates using cron job.
Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#13> I disabled nginx on the server and installed Caddy instead. I wonder how a somehow simpler config syntax (Caddyfile) compares to a simpler maintenance system (apt).
Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#14Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#15Ww have a much easier way to do this with inlets - https://docs.inlets.dev/#/get-started/quickstart-tcp-ssh?id=...
Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#16Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#17Check with your ISP to see if you have IPv6 available, and use that. I have a cheap VPS that I can jump through if I'm on an IPv4 only host.
I’m not sure people who aren’t network administrators should be putting public IPv6 all over their LAN behind their router, at least not until v6 is more common and routers have better inbound security features for such things (like how NAT functions today for v4).
Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#18Earlier quoted context omitted.
OP's solution sound good enough for their needs. Solutions can always be improved, but it's not always worth doing that.
OP has literally written in the gist about exploring a way to map entire port range and avoiding doing this, so the non hacky way of doing this is setting up something like a wireguard tunnel. That's the reason I suggested doing this instead of a tunnel which has other disadvantages like doing TCP on TCP.
The only TCP in use is the TCP connection of the SSH connection between hosts.
Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#19Earlier quoted context omitted.
OP has literally written in the gist about exploring a way to map entire port range and avoiding doing this, so the non hacky way of doing this is setting up something like a wireguard tunnel. That's the reason I suggested doing this instead of a tunnel which has other disadvantages like doing TCP on TCP.
SSH tunnels do not run TCP inside of them, just the bytes of the connection data itself. The only TCP in use is the TCP connection of the SSH connection between hosts.
Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel
#20Check with your ISP to see if you have IPv6 available, and use that. I have a cheap VPS that I can jump through if I'm on an IPv4 only host.
The solution in TFA works behind NAT and routers/firewalls, and has the added benefit of encrypting all of the traffic between the two machines thanks to SSH. I’m not sure people who aren’t network administrators should be putting public IPv6 all over their LAN behind their router, at least not until v6 is more common and routers have better inbound security features for such things (like how NAT functions today for…