Hello,

Some time ago, I started self-hosting applications, but only on my local network. So far, it’s working fine, but I can’t access them as soon as I go outside (which is completely normal).

For the past few days I’ve been looking for a relatively secure way of accessing my applications from outside.

I don’t need anyone but myself to have access to my applications, so from what I’ve understood, it’s not necessarily useful to set up a reverse-proxy in that case and it would be simpler to set up a VPN.

From what I’ve seen, Wireguard seems to be a good option. At first glance, I’d have to install it on the machine containing my applications, port-forward the Wireguard listening port and configure my other devices to access this machine through Wireguard

However, I don’t have enough hindsight to know whether this is a sufficient layer of security to at least prevent bots from accessing my data or compromising my machine.

I’ve also seen Wireguard-based solutions like Tailscale or Netbird that seem to make configuration easier, but I have a hard time knowing if it would really be useful in my case (and I don’t really get what else they are doing despite simplifying the setup).

Do you have any opinions on this? Are there any obvious security holes in what I’ve said? Is setting up a VPN really the solution in my case?

Thanks in advance for your answers!

  • friend_of_satan@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    21 hours ago

    WireGuard routes certain traffic from the client (your iPhone) through the server (the computer at your house). If you route all traffic, then when your iPhone accesses the internet, it’s as if you were at home. Since that WireGuard server is sitting on your home LAN, it is able to route your phones traffic to anything else on that LAN, or out to the internet.

    Wireguard clients have a setting called AllowedIPs that tells the client what IP subnets to route through the server. By default this is 0.0.0.0/0, ::/0, which means “all ipv4 and all ipv6 traffic”. But If all you want to access are services on your home LAN, then you change that to 192.168.0.0/24 or whatever your home subnet is, and only traffic heading to that network will be routed through the WireGuard server at your house, but all other traffic goes out of your phone’s normal network paths to the internet.

    • jobbies@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      24 hours ago

      Ahh. But what if you already used a VPN on the client for normal browsing etc - can you have two VPNs configured?

      • SpikesOtherDog@ani.social
        link
        fedilink
        English
        arrow-up
        3
        ·
        23 hours ago

        No, think of a VPN as a network cable. You can only send out of one or the other.

        Now, if you are connected to a device that has another VPN to somewhere you want to go, then technically yes you would be using 2 VPN connections.

      • friend_of_satan@lemmy.world
        link
        fedilink
        English
        arrow-up
        1
        ·
        21 hours ago

        I don’t think iOS allows multiple VPNs to be enabled simultaneously. There appears to be only one VPN on/off toggle switch. From what I’ve seen you can have different vpn profiles but only enable one at a time. I could be wrong though.

        Desktop operating systems like macOS, Linux (did I mention yet that I use arch Linux?), BSD, and um… that other one… oh yeah, Windows do allow this. I’m sure there are a variety of compatibility problems, but in general, multiple VPNs with the same or even different technologies can work together.