What is everyone doing? SELinux? AppArmor? Something else?

I currently leave my nextcloud exposed to the Internet. It runs in a VM behind an nginx reverse proxy on the VM itself, and then my OPNSense router runs nginx with WAF rules. I enforce 2fa and don’t allow sign-ups.

My goal is protecting against ransomware and zerodays (as much as possible). I don’t do random clicking on links in emails or anything like that, but I’m not sure how people get hit with ransomware. I keep nextcloud updated (subscribed to RSS update feed) frequently and the VM updates everyday and reboots when necessary. I’m running the latest php-fpm and that just comes from repos so it gets updated too. HTTPS on the lan with certificates maintained by my router, and LE certs for the Internet side.

Beside hiding this thing behind a VPN (which I’m not prepared to do currently), is there anything else I’m overlooking?

  • Possibly linux@lemmy.zip
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    I would move it into docker as that will give you a extra layer of security and simplify updates.

    From there make sure you have backups that aren’t easily deleted. Additionally make sure your reverse proxy is setup correctly and implements proper security.

  • johntash@eviltoast.org
    link
    fedilink
    English
    arrow-up
    1
    ·
    6 months ago

    Make sure your backups are solid and can’t be deleted or altered.

    In addition to normal backups, something like zfs snapshots also help and make it easier to restore if needed.

    I think I remember seeing a nextcloud plugin that detects mass changes to a lot of files (like ransomware would cause). Maybe something like that would help?

    Also enforce good passwords.

    Do you have anything exposed to the internet that also has access to either nextcloud or the server it’s running on? If so, lock that down as much as possible too.

    Fail2ban or similar would help against brute force attacks.

    The VM you’re running nextcloud on should be as isolated as you can comfortably make it. E.g. if you have a camera/iot vlan, don’t let the VM talk to it. Don’t let it initiate outbound connections to any of your devices, etc

    You can’t entirely protect against zero day vulnerabilities, but you can do a lot to limit the risk and blast radius.

  • Björn Tantau@swg-empire.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    7 months ago

    For protection against ransomware you need backups. Ideally ones that are append-only where the history is preserved.

  • thatsnothowyoudoit@lemmy.ca
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    7 months ago

    Nextcloud isn’t exposed, only a WireGuard connection allows for remote access to Nextcloud on my network.

    The whole family has WireGuard on their laptops and phones.

    They love it, because using WireGuard also means they get a by-default ad-free/tracker-free browsing experience.

    Yes, this means I can’t share files securely with outsiders. It’s not a huge problem.

    • Chewy@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      1
      ·
      7 months ago

      Wireguard is awesome and doesn’t even show up on the battery usage statistics of my phone.

      With such a small attack surface I don’t have to worry about zero days for vaultwarden and immich.

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    6 months ago

    Acronyms, initialisms, abbreviations, contractions, and other phrases which expand to something larger, that I’ve seen in this thread:

    Fewer Letters More Letters
    CA (SSL) Certificate Authority
    DNS Domain Name Service/System
    HTTP Hypertext Transfer Protocol, the Web
    HTTPS HTTP over SSL
    PiHole Network-wide ad-blocker (DNS sinkhole)
    SSL Secure Sockets Layer, for transparent encryption
    TLS Transport Layer Security, supersedes SSL
    VPN Virtual Private Network
    nginx Popular HTTP server

    [Thread #394 for this sub, first seen 1st Jan 2024, 18:55] [FAQ] [Full list] [Contact] [Source code]