Hey everyone,

I’m looking for some insights to confirm if my home server’s security is up to par against common cyber threats. Here’s a brief rundown of my setup:

  1. External Ports: I’ve limited external access to only three ports:

    • Port 80 and 443 for Nginx-Proxy-Manager
    • Port 51829 for Wireguard VPN
  2. Hardware:

    • I’m running a Raspberry Pi 4 and a Mini PC.
    • Both are connected to the router via Ethernet.
  3. Network:

    • NPM is set up for reverse proxy.
    • SSL is enabled for local DNS - to avoid memorizing IP addresses.
  4. Docker:

    • All applications are containerized and use network_mode: bridge.
  5. Internet-Facing Services:

    • Only two services are exposed to the internet:
      • A media server
      • The Wireguard VPN
    • I’m using free DuckDNS domains, configured with NPM.
  6. Firewall:

    • Currently, I’m relying on the default settings of Debian 12 and the Docker engine.
    • I haven’t set up any specific firewall rules.

Given this setup, do you think my security measures are sufficient? I’m particularly curious about the risks associated with my Docker containers and the exposed ports. Any recommendations or best practices you could share would be greatly appreciated!

Thanks in advance for your help!

  • danA
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    11 months ago

    Where possible, use that WireGuard VPN to access services when away from home. Only expose services publicly if they absolutely must be exposed publicly.

    You should follow best practices for the server itself too, even if you don’t expose SSH publicly. Make sure you’ve disabled password login for SSH (set PasswordAuthentication to no in /etc/ssh/sshd_config), and have disabled the root user (passwd -d root; passwd -l root). You can use sudo -i to get a root prompt when needed.

    Install Crowdsec or Fail2ban and ensure you properly configure it to watch all the relevant logs for all public-facing apps. Someone attempting a brute force on any public-facing app should block them from everything on the server.

    I’m using free DuckDNS domains

    IMO, drop DuckDNS and use your own domain. Using a domain controlled by someone else is a security risk since the actual owner of the domain could get hacked and point your subdomain somewhere else, MitM the traffic, etc. There’s a bunch of cheap TLDs - .top is about $4/year. If you don’t mind spending a bit more, .com is about $10/year.

    I have a domain for my personal site, and use the home. subdomain for my home server.