• 1 Post
  • 26 Comments
Joined 2 years ago
cake
Cake day: April 27th, 2022

help-circle










    • Update frequently.
    • Use HTTPS. Redirect all HTTP traffic to HTTPS. If you use Caddy as a reverse proxy, this is pretty easy to set up. You‘ll want to get a domain name though.
    • If you use systemd, then systemd-analyze security (with man systemd.directives) is your friend. Be as restrictive as possible without breaking functionality.
    • Consider putting services like Jellyfin or Nextcloud in their own containers/VMs.

    You don‘t need Cloudflare. I don‘t know why half the commenters in this thread recommend it. Cargo cult? You don‘t need DDOS protection. Nobody does DDOS attacks on random home servers. You don‘t need to hide your IP address either. Just make sure that you only expose port 80 and 443 to the internet and nothing else, and don‘t expose the admin interface of your router to the internet.

    Alternatively as others have suggested, if you‘re not sure about your ability to secure everything, only expose your services over a Wireguard VPN. You don‘t really need Tailscale if you only want to manage a handful of devices, and you also don‘t need Tailscale‘s mesh networking for your use case.





  • I don‘t know what specifically you would like to know and what your background is, so I will just elaborate a bit more.

    The basic idea is that the VPS, which is not behind a NAT and has a static IP, listens on a port for WireGuard connections. You connect from the NAS to the VPS. On the NAS you configure the WireGuard connection with “PersistentKeepalive = 25”. That makes the NAS send keepalive packets every 25 seconds which should be enough to keep the connection alive, meaning that it keeps a port open in the firewall and keeps the NAT mapping alive. You now have a reliable tunnel between your VPS and your NAS even if your IP address changes at home.

    If you can get a second (public) IP address from your provider you could even give your NAS that IP address on its WireGuard interface. Then, your VPS can just route IP packets to the NAS over WireGuard. No reverse proxy needed. You should get IPv6 addresses for free. In fact, your VPS should already have at least a /64 IPv6 network for itself. For an IPv4 address you will have to pay extra. You need the reverse proxy only if you can‘t give a public IP address to your NAS.

    Edit: If you have any specific questions, feel free to ask.