Hacker News new | ask | show | jobs
by Y_Y 1714 days ago
I wanted to build a TeamViewer-type system using reverse tunnels so that I could access my possibly NAT'd or dynamic IP machines from each other in a simple way. The typical use would be SSH control, copying files each way, VNC. I came up with something where each machine connects to a an always-on server with a domain name, and offers a reverse tunnel I can use to SSH down, but it occurs to me that there might be a better way, or even a tool someone has already build. Does anyone know of something like this?

(pwnat is pretty cool, but I don't think it does quite what I'm looking for)

12 comments

I use WireGuard with a server in my pantry as a router. Dynamic IP of the server is handled by DuckDNS, and WireGuard gracefully handles client roaming e.g. I can switch from home wifi to mobile internet without interrupting my SSH sessions. Would recommend.
You should check https://sshreach.me - zero-configuration, remote-controlled secure tunnels to your computers. I am the author of the service.
Bookmarked your page. Am building embedded devices and thought about having them keep reverse tunnels to some gateway server. Cool, that there's a dedicated service for that! Have my own domain but am still eager to outsource this part.

Some things to note:

- The sshReach.me logo in the topbar links to https://sshreach.me/init/default/index.html rather than https://sshreach.me. Expected the latter to have a clean URL to bookmark.

- At the very bottom of https://sshreach.me/init/default/index.html, the links {debian,arch,mint,...} link to the distro homepages. I expected links going to distro-specific guides on how to set these distros up to use our service.

- The Yocto project is quite popular for building embedded devices. It would probably push your service, if you would provide yocto recipes which make the created systems maintain reverse ssh tunnels to your service.

Hi, thanks for the feedback.

- Both links lead to the same place but thanks for the advice, we will change the link on the logo.

- There are no distro specific guides because for every distro the setup is the same - just download our client script and run it. It is made to work with minimal python install and to work on every distro.

- I haven't heard of Yocto project, I will definitely look into it, thanks for the info.

Wireguard is my personal preference for this.
There are actually quite a few lovely tutorials for WireGuard out there and in my experience its performance is also far better than that of OpenVPN or other solutions, as well as the configuration is pretty easy.

I actually used it for working around NAT with a cheap VPS which now acts as an ingress and proxies the requests for all of the ports over to one of my homelab servers that i want to expose: https://blog.kronis.dev/tutorials/how-to-publicly-access-you...

(disclaimer: the above blog post is pretty simplistic and shouldn't necessarily be followed to the letter, in most cases you'll want to expose ports on a case by case basis)

For remote shell support tmate is great. You can run your own server or use theirs.

https://tmate.io/

That's where I make use of the "SSH Jump Host" capability. It's an incredible feature that is similarly not well known:

https://wiki.gentoo.org/wiki/SSH_jump_host

Not sure if it is exactly what you are looking for, but I use Remote Support Tool [1] as a free software TeamViewer replacement, and it works perfectly for me.

[1] https://github.com/OpenIndex/RemoteSupportTool

ZeroTier might be of interest.
Using Zerotier for this for quite a while now and can confirm it is working quite nicely.

TailScale might be an interesting alternative. Even more so as with headscale there is an Open Source server side implementation. Have not tested neither of those though.

The blog the article is on is from teleport (goteleport.com), which you might want to take a look at. I haven't used it myself but it could be used for this task.
Check out Tailscale. It's magic and free.

https://tailscale.com/

Tailscale?
Take a look at Cloudflare Tunnels.