Live data from Hacker News

SSH into private machines from anywhere using Cloudflare Tunnel

orth.uk

51–60 of 197 posts

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#52
post #38

Earlier quoted context omitted.

No, pull requests are not illegal, at least when done on Github, because by posting code on Github (that you are allowed to post) you grant Github and its users certain rights: https://docs.github.com/en/github/site-policy/github-terms-o... > By setting your repositories to be viewed publicly, you agree to allow others to view and "fork" your repositories (this means that others may make their own copies of Content f…

That license doesn't allow modifications, which is what pull requests are. The forking thing is only about making copies, not modifications.

I suppose you can modify the code, but not use it (compile) as such?

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#53
post #11

You can also do this using the Tor network, by setting up onion services.

It's much easier, much cheaper, and does not rely on a centralized cloud vendor. Here's how to do it in a few lines:

    apt install tor
    echo HiddenServiceDir /var/lib/tor/myserver\
    HiddenServicePort 22 127.0.0.1:22 >> /etc/tor/torrc
    systemctl restart tor
Now tor is generating the keypair for the server. It will take a few seconds: once that's done, read the onion address from /var/lib/tor/myserver/hostname and you can start using it from the client, either with explicit ssh proxy config or with global client SSH config AutomapHostsOnResolve which enables to transparently map .onion domains to local IPs that the tor daemon will tunnel right over to the onion.

Bonus point: you get automatic certificate verification as part of the onion name itself, and you can also restrict the tor server configuration to allow only specific public keys (those who don't have them will not even reach sshd).

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#54

> Question: do you use a different tool which require no maintenance or cost to run? Answer: ZeroTier -- on Mac, Linux (home & cloud), Windows, Android I actually setup DNS entries resolving to private IPs as configured in ZeroTier so I didn't have to login to dig them up but my default DNS provider won't resolve them. I guess newer ZeroTier versions optionally have DNS covered these days but I haven't looked into it…

The crypto part of ZeroTier is getting some love soon but we are taking our time to get it right and get peer review. Implementing ideas from WireGuard and Signal.

Also the pricing is for our controller SaaS. If you want to self host controllers you can for free. There is a free community developed control panel somewhere.

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#55
post #42
post #9

Can we stop posting stuff that makes even more people give the keys of their house to the BigCorp cartel?

This configured system, unlike the rest of the way CloudFlare works with http, is actually end to end encrypted.

Maybe an improvement:

s/http/https/

-or-

s/http/SSL/

since http is technically often referring to unencrypted port 80 transport.

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#56

> Each port is also limited to a single machine, so you'd have to choose a different port for a different machine. I would probably set up one gateway machine, and then from that machine log into other machines on the network; instead of exposing them all to the Internet. SSH allows you to chain logins thus: ssh -A -t user@public-gateway ssh -A -t user2@server-behind-dmz It's a lot less work to lock down one machine…

That's how we do it where I work. We have a bastion server we SSH into to access other systems in the network.

Pretty easy to setup SSH to use it to hop through with just one command.

https://www.redhat.com/sysadmin/ssh-proxy-bastion-proxyjump

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#57
post #54

> Question: do you use a different tool which require no maintenance or cost to run? Answer: ZeroTier -- on Mac, Linux (home & cloud), Windows, Android I actually setup DNS entries resolving to private IPs as configured in ZeroTier so I didn't have to login to dig them up but my default DNS provider won't resolve them. I guess newer ZeroTier versions optionally have DNS covered these days but I haven't looked into it…

The crypto part of ZeroTier is getting some love soon but we are taking our time to get it right and get peer review. Implementing ideas from WireGuard and Signal. Also the pricing is for our controller SaaS. If you want to self host controllers you can for free. There is a free community developed control panel somewhere.

Managing expectations re:v2 is not going well for me. I wasn't really aware WireGuard-ish crypto improvements were happening (hire the personalities™ freelance ASAP or at least for review), and timeline is basically a punchline at this point... I recommend just owning both (edit: start today!) as 'when it's finished' on the front page if you want to appeal to techs.

I updated re:free, thanks.

Their appear to be two (Node.js/GPL3) control panels: https://github.com/key-networks/ztncui and https://github.com/dec0dOS/zero-ui

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#58
post #14

Unfortunately the cloudflared software, while the source is available on GitHub, and there are pull requests open and accepted for it, is not under an open source license, and the license it is under does not allow modifications, so any modifications (including the aformentioned pull requests) are contrary to the license and thus copyright law and thus illegal. The issue I filed about this is still waiting for action…

Breaking a contract is not illegal. Seems to be a common misconception.

I think the misconception is between civil law and criminal law.

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#59

You can get virtual server for $4/month. Installing proprietary software and registering to some service, that may "upgrade" to premium tier anytime, is pretty off-putting.

Why use a virtual server if you want to connect to your home network?

Re: SSH into private machines from anywhere using Cloudflare Tunnel

#60

Personally I’m happier to use wireguard to access my network. I don’t know when I’d ever want a pure SSH tunnelling solution.

Cloudflare Tunnel uses Wireguard under the hood.

Never heard of Wireguard, so I went to their website and for a half second. I thought I cracked the screen on my new phone, because of their freaking background image....

But, it looks interesting. I'll have to check it out more.

Post reply on HN