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?

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

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

  • beerclue@lemmy.world
    link
    fedilink
    English
    arrow-up
    7
    ·
    9 months ago

    Not only for Nextcloud, but I recommend setting up crowdsec for any publicly facing service. You’d be surprised by the amount of bots and script kiddies out there trying their luck…

    • thisisawayoflife@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 months ago

      One of my next steps was hardening my OPNSense router as it handles all the edge network reverse proxy duties, so IDS was in the list. I’m digging into Crowdsec now, it looks like there’s an implementation for OPNsense. Thanks for the tip!

      • TwinHaelix@reddthat.com
        link
        fedilink
        English
        arrow-up
        2
        ·
        9 months ago

        My recollection is that Fail2Ban has some default settings, but is mostly reactionary in terms of blacklisting things that it observes trying to get in. Crowdsec behaves in a similar vein but, as the name implies, includes a lot of crowdsourced rules and preventative measures.

      • Comptero@feddit.ch
        link
        fedilink
        English
        arrow-up
        1
        ·
        9 months ago

        In my understanding fail2ban will block ips if they are detected to do brutforce or use known exploits.

        Crowdsec will share this IP via a blocklist to all subscribte systems. You will benefit form the detection of other systems and not only your own.

  • thatsnothowyoudoit@lemmy.ca
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    9 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.

  • lemmyvore@feddit.nl
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 months ago

    All the measures you listed amount to nothing against a zero day remote exploit. They bypass the normal authentication process.

    If you’re not able to use a VPN then use a IAM layer, which requires you to login through another method. You can use a dedicated app like Authelia/Authentik in front of the reverse proxy, or if you use nginx as reverse proxy you also have to option of using the vouch-proxy plugin.

  • hottari@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    9 months ago

    I’ve had my Nextcloud exposed for a long while now without any incidents (that I know of). I know automatic updates are not generally recommended but if you want a lighter load, you could use LSIO’s docker container (I use the standard db in the sample config). I run mine that way with watchtower and can’t recall ever in recent times when an update broke Nextcloud. Other than that, nextcloud has a brute-force plugin and you could consider overall hardening the entry points of the machine hosting Nextcloud (e.g ssh).

  • Decronym@lemmy.decronym.xyzB
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    8 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]