Would I be compromising on the security of my local network and all the devices on it?

I have a ton of local-only self hosted services, some may have personal data that I would not be compromised of affected.

Now of course, I can work on securing those local services from each other, but still, the idea of opening up a port to the public seems incredibly insecure to me. Is there a way to host services publicly from a local network without compromising on security?

I know I could host on a cloud provider or VPS, but for certain things I’d prefer to keep it local (especially for things that may violate VPS providers’ terms of service, like media apps)

  • benonions@programming.dev
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year ago

    If something doesn’t absolutely have to be public, then hosting a VPN or using tailscale (or if you prefer something self-hosted, nebula) can be good too.

    If you DO want the application(s) to be public, then something I tried in the past that worked well:

    I set up on a super cheap VPS and then set up a tunnel (using nebula) to a VM in my homelab. I made sure to configure nebula networking so as to only allow the VM and VPS.

    Both the VPS and the VM were set up to allow only SSH using an ssh key. I threw on fail2ban for the VPS for good measure. It’s scary seeing just how many bots attempt to log in the logs.

    On the VPS, I installed nginx proxy manager and configured URLs on the nginx proxy manager to redirect each to different ports on the VM where apps (like nextcloud, an xmpp server etc) were running in docker.

    Doing things that way you’re only using the VPS as a HTTP/TCP proxy to the server in your home, not actually using VPS storage/processing power beyond the bare minimum for running nginx.