cross-posted from: https://quokk.au/c/networking/p/1361835/how-to-set-up-cloudflare-tunnels-for-ssh-access

I’m trying to configure a cloudflare tunnel that goes to my home server because it’s behind CGNAT.

If I add a route that goes to my Apache server, it seems to show up correctly.

If I add a route to SSH, it doesn’t seem to work. Trying to run the SSH command to that route will just be stuck forever.

I tried configuring the SSH browser rendering in Cloudflare, but then after login it just gives me an unexpected error occurred.

Anyone who has experience setting something like this up can tell me what I’m doing wrong?

  • AloneDownUnder@quokk.auOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 days ago

    I actually figured it out.
    The reason it was not connecting through the tunnel to my ssh server was because cloudflare uses different MAC than default in openSSH. I added those MACs to my ssh config and it works now!

    • AloneDownUnder@quokk.auOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      5 days ago

      Additionally, I had to make sure to add the pubkey algorithms to my ssh config that cloudflare uses. This way I can use ssh without leaving password authentication enabled

    • AloneDownUnder@quokk.auOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      6 days ago

      Yeah. You can host static pages and workers, and make tunnels.

      I’m just using everything free though. Quite a bit of options without paying

      • Reannlegge@lemmy.ca
        link
        fedilink
        English
        arrow-up
        0
        ·
        6 days ago

        If I did not have such an ick from Cloudflare, and was not already paying for most of those services/using other free sevices I would maybe check them out. Don’t ask me why I have the ick from Cloudflare, cause I do not know. I am paying for services because I have a domain that hosts my very simple blog, an email address with a wild card, so I can have unlimited email addresses, a VPS that hosts backups and ghost (my blogging software). SSL, and TLS. For DoT (DNS over TLS) I use CIRA, and for DNS I use two piholes.

        • AloneDownUnder@quokk.auOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          13 hours ago

          yeah, no point using cloudflare then. I suppose I’m using them because it offers a free option for me, and they are a pretty big company, so not suddenly going to die off, or have uptime issues.