Wireguard is blocked in my country, so I no longer can use Tailscale or other Wireguard-based solutions. My home server is behind a NAT. What other ways of secure private connection can I use?

    • myszka@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      13 days ago

      Yes it’s what I use for normal VPN, but I need to get around the NAT somehow. There’s been a PR for NetBird that implements AWG but it was never merged

  • black0ut@pawb.social
    link
    fedilink
    English
    arrow-up
    17
    ·
    17 days ago

    OpenVPN in TCP mode wrapped around Stunnel. That’s the thing that works.

    I have it set up to bypass VPN restrictions in some networks, but it also serves to bypass a lot more stuff if you know what you’re doing.

    DPI will only see TLS traffic, and assume it’s HTTP. You can even try to fool it by modifying the packet headers, so dumb enough DPI will think you’re connecting to the site you choose.

    • purplemonkeymad@programming.dev
      link
      fedilink
      English
      arrow-up
      2
      ·
      16 days ago

      We have had success with this on port 443 and it appears to do a good job on networks that only allow browsing. Usual problems with TCP based VPN still apply.

  • MuttMutt@lemmy.world
    link
    fedilink
    English
    arrow-up
    17
    ·
    17 days ago

    First, you need to verify whether you actually have a public IP or if your ISP has you stuck behind CG-NAT, because that dictates your options.

    ​If you’re behind CG-NAT, ​Cloudflare Tunnel (cloudflared): This is usually the easiest path if you are mostly trying to access web-based services (HTTP/HTTPS) on your server. Your home server initiates the outbound connection to Cloudflare, so CG-NAT doesn’t matter. You just set up a domain (or subdomains) for each service you want to reach. If you need full network-level or SSH access rather than just web apps, check out ZeroTier.

    ​If you have a direct public IP (even a dynamic one), you can run a reverse proxy like Caddy paired with a free DDNS provider like DuckDNS or FreeDNS. One nice thing about Caddy is that it handles getting and renewing real, valid Let’s Encrypt SSL certificates automatically, so you don’t have to deal with manual or self-signed certs at all.

    ​Dealing with the WireGuard block, if your country’s ISP is using Deep Packet Inspection (DPI) to identify and drop WireGuard traffic, traditional VPNs like OpenVPN might get blocked pretty quickly too. If you still want a true VPN setup, look into AmneziaWG (it’s a fork of WireGuard specifically modified to scramble packet signatures and bypass DPI) or obfuscated proxy protocols like V2Ray / Xray or Shadowsocks.

  • sandwichsaregood@lemmy.world
    link
    fedilink
    English
    arrow-up
    15
    ·
    17 days ago

    Sing-box is a VPN tool built to evade censorship https://github.com/SagerNet/sing-box . It is extremely resilient and stealthy.

    See also, xray and v2ray, which are similar, but in my experience sing-box is a bit better documented (at least in English) and has better maintained client apps.

    Setting any of these up can be complicated, but LLMs can get you pretty far if you have safe access.

  • talkingpumpkin@lemmy.world
    link
    fedilink
    English
    arrow-up
    9
    ·
    17 days ago

    Wow. Do they block VPNs inside your country too?

    Anyway, there’s openvpn and there’s nebula (I think nebula doesn’t use wireguard… do double-check), or you look into things built specifically to hide traffic (keyword: “vpn obfuscation”).

    No idea if VPN protocols other than wireguard may be blocked too (probably?).
    No idea if trying too hard to circumvent government policies may get you added to some list you’d rather not be in.

      • Possibly linux@lemmy.zip
        link
        fedilink
        English
        arrow-up
        3
        ·
        17 days ago

        China uses deep packet inspection so that makes sense

        I think the the great Firewall is less restrictive with QUIC traffic. It might be worth trying fragmented QUIC as from what I’ve read the GFW struggles to reconstruct the traffic

        • Tiger@sh.itjust.works
          link
          fedilink
          English
          arrow-up
          1
          ·
          17 days ago

          I use two services that do work and alternate between them: Mullvad with Obfuscation turned on, and Ghelper paired with Shadowrocket (China side ones used by Chinese devs)

    • FedX@quokk.au
      link
      fedilink
      English
      arrow-up
      5
      ·
      17 days ago

      From what I can tell, the issue with Wireguard is that the traffic is quite obvious. Other options might be blocked, but technically harder to implement said blocks.

    • sandwichsaregood@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      17 days ago

      WG is not meant to be a stealthy protocol and is easy to detect at the ISP level. It has distinct characteristics that packet inspection tools can use to identify it by examining the traffic and block or flag it. Blocking it completely is trivial for any ISP, much less a nation.

      There are modified versions like AmneziaWG that make it stealthier, or alternative protocols built to evade traffic inspection like xray or sing-box (these two are really more like protocol frameworks that have multiple protocols you can use). It’s a bit of an arms race for packet inspection tools to be able to reliably identify these intentionally stealthy protocols, but the advantage is generally in your favor as long as you are using your own servers and not public VPNs. Though even then you need to take care to camouflage your traffic to be truly safe, like if you are shoving all of your traffic through one remote server that has approximately the same amount of traffic going out immediately etc that is something that can also be identified.

      How much precaution is actually warranted depends on where you are and what the potential consequences are. You don’t have to go to a full tinfoil hat paranoia level setup to avoid most blocking.

    • irmadlad@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      17 days ago

      I’m an expert at nothing, but I would imagine that different VPN like WireGuard have different detectable signatures, much like different browsers have different signatures that can be detected. Also, for commercial VPNs, the IPs that the VPN company uses are easily identifiable.

  • alienghic@slrpnk.net
    link
    fedilink
    English
    arrow-up
    7
    ·
    16 days ago

    Can you set your NAT to port forward a port to your ssh host?

    I’m currently using yggdrasil to deal with this problem, though I’ve also used tor hidden services.

  • iocase@lemmy.zip
    link
    fedilink
    English
    arrow-up
    6
    ·
    16 days ago

    I haven’t tried it myself but I’ve been looking at NetBird.

    Elevator pitch page

    Maybe others who’ve used it or know more can chime in on if this is a good idea or not?

  • FedX@quokk.au
    link
    fedilink
    English
    arrow-up
    7
    arrow-down
    1
    ·
    17 days ago

    That’s quite fascinating, didn’t realize Wireguard could be blocked in that way (although the WG traffic is pretty obvious looking, so it makes sense). The only solution I know of without a need for a VPS is hosting everything on Tor. Wildly private and secure, but also wildly slow. Beyond that, there are a number of ways of using a VPS to similar effect, I know people have used Cloudflare Tunnel to similar effect in the past.

    Also, there are apparently quite a number of wiregaurd derivatives which protect better against detection and blocking methods. amnezia and wstunnel are the two that came up. Likewise, you will need a VPS, and might even be able to set up a tailscale-like coordination server that way (maybe with headscale, or maybe with one of its competitors like NetBird).

    ZeroTier might also get the job done, but I really don’t know much about it.

    Hope this helps, and good lucks!

    • myszka@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      13 days ago

      Thanks! I do have a VPS. Can amnezia or wstunnel be used with headscale? That’d be amazing

      • FedX@quokk.au
        link
        fedilink
        English
        arrow-up
        1
        ·
        12 days ago

        In theory yes, in practice, I have no idea. My guess is you would need to soft-fork the project to get it using either project, or maybe be really, really nice to the devs and ask them to support additional protocols. Technically there is no reason it wouldn’t work, but whether or not there are enough people with your usecase for devs to justify implementing a new feature is another matter entirely.

    • myszka@lemmy.mlOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      13 days ago

      Yes, I’ve tried that, but it’s not robust enough. This is what I’ll eventually resort to, if I don’t find a better solution.

  • Evil_Incarnate@sopuli.xyz
    link
    fedilink
    English
    arrow-up
    6
    ·
    16 days ago

    Zerotier. They have their own protocol, and there’s a free tier that lets you connect up to ten machines to make a network.

    Also possible to selfhost, although I haven’t done it.

  • mushroommunk@lemmy.today
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    17 days ago

    Can you switch to IPv6? My ISP NATs me on IPv4 but I’m clear through on IPv6 and so that’s how I run everything.

    I’m assuming the NAT is your ISP’s, if it’s yours then ignore me.