I’m pretty new to selfhosting and homelabs, and I would appreciate a simple-worded explanation here. Details are always welcome!

So, I have a home network with a dynamic external IP address. I already have my Synology NAS exposed to the Internet with DDNS - this was done using the interface, so didn’t require much technical knowledge.

Now, I would like to add another server (currently testing with Raspberry Pi) in the same LAN that would also be externally reachable, either through a subdomain (preferable), or through specific ports. How do I go about it?

P.S. Apparently, what I’ve tried on the router does work, it’s just that my NAS was sitting in the DMZ. Now it works!

  • Allero@lemmy.todayOP
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    7 hours ago

    That’s a good piece of advice, but die to several considerations (extreme censorship interrupting VPN connections, family using NAS for automatic backups, and some others) I cannot go that route.

    • Possibly linux@lemmy.zip
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      2 hours ago

      What do you mean by blocked at a protocol level? You might give it a try on a random port to see what happens.

      You could also look into port knocking. It is dated but still worth while.

      • Allero@lemmy.todayOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        10 minutes ago

        I mean any connection through these protocols is just not working over the Internet. DPI equipment detects respective packets and cuts the connection.

    • greybeard@feddit.online
      link
      fedilink
      English
      arrow-up
      2
      ·
      7 hours ago

      There’s nothing saying you can’t have ports forwarded for the NAS, and have a VPN for everything else. Censorship may be a problem, but those more often block VPN services like NordVPN, not protocols. So running your own is less likely to be stopped. That said, of course comply with local laws, I don’t know where you live or what’s legal there.

      If you really want multiple things exposed at the same time, you have two options(which can be used in combination if needed/wanted):

      1. A reverse proxy. I use caddy. I give it a config file that says what address and port binds to what hostname, and I forward port 443/80 to it. That works great for web content.
      2. Use custom ports for everything. I saw someone else walking you through that. It works, but is a little harder to remember, so good notes will be important.

      I still recommend against forwarding a lot of ports as a beginner. It’s very common for software and web apps to have security vulnerabilities, and unless you are really on top of it, you could get hit. Not only does that put all your internal devices at risk, not just the one that was original breached, it also will likely become part of a botnet, so your local devices will be used to attack other people. I’d recommend getting confident with your ability to maintain your services and hardening your environment first.

      • Allero@lemmy.todayOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        7 hours ago

        It’s not illegal to use VPN in my area, but connections are blocked on a protocol level, both through OpenVPN and Wireguard.

        I already managed to make caddy work, so, hooray!

        I also found a setting on my router that fully isolates certain devices from the local network. I want to put the server in there, so that the rest of my LAN is not under threat. I also want to figure out VLANs.

        • orosus@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 hours ago

          I am not an expert on security and I don’t know how to setup ddns, but I simply use Tailscale VPN to access my RPi4 homeserver running Umbrel from outside of my home, I simply installed Tailscale in my Umbrel and in my phone, and when I want to access from my phone Immich, Nextcloud or any other app running on my Umbrel. I simply enable the Tailscale VPN. Maybe it has some limitations, but is the simpler way I found, and based on what I read, it is more secure than exposing a port in the router, but not sure.