Live data from Hacker News

Putting Raspberry Pi Online with Caddy and SSH Tunnel

gist.github.com

51–60 of 157 posts

Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel

#51
post #4

I have a similar setup but instead of SSH Tunnels i use wireguard. In my case some services are not routed to the public internet and only accessible from within my privat wireguard network. E.g my smart home hub. I really like the flexibility to decide whats available for who.

Could you please elaborate on your setup? I haven't had the opportunity to play with Wireguard yet, that could be a useful first project to me :-)

I've started playing around with Tailscale [1], which is based on WireGuard. Free to use for a single user, and I've tried it out on Raspberry Pi, Linux x86_64, Windows and Android. Seems to work well, except there appears to be some issue with accessing Windows via the secure IP (neither ping nor Remote Desktop appear to get through the Windows firewall, despite having a specific firewall rule for Tailscale) [2]. Can SSH into e.g. Linux hosts using PuTTY from Windows without issues.

[1] https://tailscale.com/

[2] https://github.com/tailscale/tailscale/issues/854

Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel

#52

Side conversation: I'm interested in being pretty good at this sort of thing: setting up servers, making them connect, understand the protocols enough to put them to practice. I believe this is in the realm of IT. What are some good resources to read to get to my goal? Thanks!

NetworkChuck, Elithecomputerguy, Level1 Techs

Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel

#53
Having used SSH for this purpose for some time, I decided to build an automatic service for easing reverse HTTP, HTTPS, and SSH ProxyJump through SSH tunnels, its available on Github as well, but if you'd like, try it out:

ssh -R80:localhost:80 remote.moe

it should output an URL where your local port 80 is now available

https://github.com/fasmide/remotemoe

Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel

#54
post #4

I have a similar setup but instead of SSH Tunnels i use wireguard. In my case some services are not routed to the public internet and only accessible from within my privat wireguard network. E.g my smart home hub. I really like the flexibility to decide whats available for who.

Could you please elaborate on your setup? I haven't had the opportunity to play with Wireguard yet, that could be a useful first project to me :-)

the idea is that your hetzner server acts as a gateway and you can communicate with your pi through the virtual private network, therefore removing any need to access through public ip.

Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel

#56

I install a reverse proxy on every remote machine (raspberry pi or odroid) I manage. These machines are usually tucked behind someone's router, and it is hard to tell every router owner to forward the ssh port. When I install a reverse proxy, the machines can proactively tunnel right into a beacon machine whenever they are online and I can ssh into them from the beacon machine directly. I usually set up frpc as a ser…

Oooh, thanks for this, I'm currently using the autossh route but have had some issues with it. frp looks like it could solve my problems :)

Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel

#58
post #4

I have a similar setup but instead of SSH Tunnels i use wireguard. In my case some services are not routed to the public internet and only accessible from within my privat wireguard network. E.g my smart home hub. I really like the flexibility to decide whats available for who.

I did the same. It works really well for hole-punching through my stupid Comcast router! And I anticipate it will continue to work really well as I add more devices on my parent's, sibings', etc networks. It's cool to not have to think at all about where my devices are, since they're just all directly accessible through their dedicated IP on the wireguard VPN.

I also have my phone, laptop, etc all on the wireguard VPN, so I can ssh to anything from anywhere. I also have my laptop open to password-based ssh only from my wireguard VPN, so I can ssh (via termux) into my laptop, which has been extremely convenient in addition to being just plain cool. I can't speak highly enough of wireguard!

Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel

#59

You could do same with free tier google instance micro. The thing is, what do you get from exposing your own pi to internet ? Like you are not going to host websites and shit so what crude home automation and monitoring system ?

Why not? Maybe not for a client, but for a blog or static site it takes just about no compute to host that, especially if it's behind Cloudflare or something.

Re: Putting Raspberry Pi Online with Caddy and SSH Tunnel

#60

I install a reverse proxy on every remote machine (raspberry pi or odroid) I manage. These machines are usually tucked behind someone's router, and it is hard to tell every router owner to forward the ssh port. When I install a reverse proxy, the machines can proactively tunnel right into a beacon machine whenever they are online and I can ssh into them from the beacon machine directly. I usually set up frpc as a ser…

What are you using for your beacon machine?

Do you have a static IP or a domain that your beacon uses?

Post reply on HN