As the title says, I want to know the most paranoid security measures you’ve implemented in your homelab. I can think of SDN solutions with firewalls covering every interface, ACLs, locked-down/hardened OSes etc but not much beyond that. I’m wondering how deep this paranoia can go (and maybe even go down my own route too!).

Thanks!

  • @Dehydrated@lemmy.world
    link
    fedilink
    English
    111 year ago
    • Custom Router/Firewall running OPNsense and the Sensei plugin
    • Extensive DNS filtering through Pihole
    • Redirecting all DNS requests to my Pihole through OPNsense
    • My entire network is behind a multi hop VPN
    • I don’t let any Windows systems connect to the internet, instead, I have a Linux server which is connected to the internet (through a VPN of course) and runs a browser, and I use X2go to access the browser which is running on the Linux server
      • @Dehydrated@lemmy.world
        link
        fedilink
        English
        21 year ago

        I am aware of the ME, but I can’t really do anything about it. Current ARM SBCs are not suitable for a router/firewall (at least in my experience). I’m not that concerned about it though.

        • @MigratingtoLemmy@lemmy.worldOP
          link
          fedilink
          English
          41 year ago

          OpenWRT isn’t half bad for usual “router stuff”, but advanced usage is a bit hard to do. Of course, that doesn’t eliminate the problem since ARM can have plenty of backdoors too

    • @KairuByte@lemmy.dbzer0.com
      link
      fedilink
      English
      31 year ago

      Wouldn’t that last bullet mean you’re not updating the windows machines whatsoever? Would this not cause more security issues in the long run, considering “connected tot he internet” isn’t a requirement to spread an infection.

      • @Dehydrated@lemmy.world
        link
        fedilink
        English
        31 year ago

        It might sound ridiculous, but I currently also run a WSUS server to get Windows updates. But I will probably replace my entire Windows setup with a better solution. Since I don’t run Windows bare-metal anymore, I’m looking forward to using offline Windows VMs on my Proxmox host and just accessing the internet directly from my Linux machine.

  • @conorab@lemmy.conorab.com
    link
    fedilink
    English
    41 year ago

    I used to have all VMs in my QEMU/KVM server on their own /30 routed network to prevent spoofing. It essentially guaranteed that a compromised VM couldn’t give itself the IP of say, my web server and start collecting login creds. Managing the IP space got painful quick.

  • enkers
    link
    fedilink
    English
    111 year ago

    Using SPA firewall knocking (fwknop) to open ports to ssh in. I suppose if I was really paranoid, the most secure would be an air gap, but there’s only so much convenience I’ll give up for security.

    • @MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      41 year ago

      I’m going to save your comment because it has opened up a new technique for network security that I had never thought of before. Thanks a bunch

  • dr_robot
    link
    fedilink
    411 year ago

    Logcheck. It took ages to make sure innocent logs are ignored, but now I get an email as soon as anything non-routine happens on my servers. I get emails with logs from every update, every time I log in, etc. This has given me the most confidence that nothing unexpected is happening on my servers. Of course, one needs to make sure that the firewall is configured well, and that you use ssh keys etc., but logcheck is how I know I’m doing enough.

  • @thantik@lemmy.world
    link
    fedilink
    English
    33
    edit-2
    1 year ago

    I’ve replaced reconnaissance commands (a handful of them found here: https://www.cybrary.it/blog/linux-commands-used-attackers) – whoami, uname, id, uptime, last, etc

    With shell scripts which run the command but also send me a notification via pushover. I’m running several internet-facing services, and the moment those get run because someone is doing some sleuthing inside the machine, I get notified.

    It doesn’t stop people getting in, I’ve set up other things for that – but on the off chance that there is some zero-day that I don’t know about yet, or they’ve traversed the network laterally somehow, the moment they run one of those commands, I know to kill-switch the entire thing.

    The thing is, security is an on-going process. Leave any computer attached to the internet long enough and it’ll be gotten into. I don’t trust being able to know every method that can be used, so I use this as a backup.

    • @MigratingtoLemmy@lemmy.worldOP
      link
      fedilink
      English
      71 year ago

      That’s a very good idea. Something to think about, especially if you have open ports and are paranoid enough (aren’t we all? Hehe). Thanks

  • Kata1yst
    link
    fedilink
    171 year ago

    Really all I do is setup fail2ban on my very few external services, and then put all other access behind wireguard.

    Logs are clean, I’m happy.

  • @NuXCOM_90Percent@lemmy.zip
    link
    fedilink
    English
    43
    edit-2
    1 year ago

    Never used it “in anger” but:

    I have my firewall plugged into a metered outlet (plugged into a UPS). I have it set up to send me alerts if power draw increases beyond a certain threshold. I’ve tested it and wireguard is measurable (yay) but so are DDOS attacks. If I get that alert, I can choose to turn off that plug and take my whole network offline until I get home and can sort that out.

    Gotten a few false positives over the years but mostly that is just texting my partner to ask what they are doing.

    • @ililiililiililiilili@lemm.ee
      link
      fedilink
      English
      51 year ago

      Care to share what outlet you had success with? I’m comfortable with Home Assistant and ZigBee/Z-Wave. Something this critical probably shouldn’t be wireless, but I digress. I’m also interested in what software you’re using for monitoring and alerts (if you’re willing to share). Cheers!

      • @NuXCOM_90Percent@lemmy.zip
        link
        fedilink
        English
        41 year ago

        I just use a pretty generic z-wave plug and home assistant. In the past I did more complex setups that actually determine what process is spiking and so forth. But eventually realized that “this is doing a lot of compute…” is a catch all for a LOT of potential issues.

        And I guess I don’t understand what you mean by “shouldn’t be wireless”. It is inherently going to be wireless because you will be on your phone on the other side of the planet. If you genuinely suspect you will be vulnerable to attacks of this scale then you… probably have other things to worry about.

        But as a safety blanket?

        • @ililiililiililiilili@lemm.ee
          link
          fedilink
          English
          11 year ago

          Gotcha. A ZigBee/Z-wave plug was the first thing that came to mind. I’ll probably go the same route. I was merely saying that wireless-anything is less dependable than wired. But I don’t even know if wired smart plugs exist. I use wireless sensors around my home and I’ve never had an issue with dependability. I definitely wasn’t considering Z-wave as a local attack vector. I was just brainstorming some way to avoid a wireless solution for something where dependability is paramount.

    • Avid Amoeba
      link
      fedilink
      English
      31 year ago

      Or you could trigger automation that turns it off for hours, then turns it back on. That way you could get around the need to physically turn it on, in case everyone is away.

      • @NuXCOM_90Percent@lemmy.zip
        link
        fedilink
        English
        91 year ago

        With my firewall disabled a lot of my internal network (including home assistant) will fall over sooner than later.

        But that is also a recipe for mass stress. Because I know “something happened”. And now I know “in six hours, I need to check in and make sure that ‘something’ is still not happening”. Which is extra shitty if I got the notification late evening local time.

        I have friends/neighbors that I trust to swing by and push a button in the event I need to bring it back up before I get home. But if I have reached the point of “it is possible my wireguard credentials were compromised?” then I really don’t need to be able to download the next episode of ATLA NOW.

  • @Gooey0210@sh.itjust.works
    link
    fedilink
    English
    71 year ago

    Notifications on system file access

    Notifications on root login/sudo

    Declarative OS, tmpfs root, disabled sudo

    Bastion server, but right now I don’t have a proper router to do it at home

    Yubikey, or a separate phone on Graphene OS for otp, keys, etc

    Authelia + fascist fail2ban (or some CSF)

    Most of these are pretty normal, but usually you don’t do them all at once 😄 also, I don’t really like hiding my services from the open internet, authelia is fine tuned to let people only access what they are supposed to. And regular users of my server usually don’t notice that I even have it

    • Baut [she/her] auf.
      link
      fedilink
      English
      11 year ago

      Declarative OS, tmpfs root, disabled sudo

      How do you change anything about the OS/do updates? iirc nixos requires elevated privileges for that?

      • @Gooey0210@sh.itjust.works
        link
        fedilink
        English
        1
        edit-2
        1 year ago

        There are many ways to do many things in nixos

        For updates you can do automatic updates

        Also, there are many deployment tools, like deploy-rs, morph, colmena, bento. They all have different approaches. Some you use ssh to deploy a remote system. Some just fetch the configuration and autodeploy it.

        There are many ways how you can play with this. So you can disable sudo, and deploy with ssh only from some or a specified ip. Or you can keep ssh for root disabled and just deploy home-manager. It’s really a lot, you imagination is the only limit

        P.s. or you can just generate an image from a trusted machine, and flash it onto the device you want, unlimited number of ways

    • @SaintWacko@midwest.social
      link
      fedilink
      English
      2
      edit-2
      1 year ago

      I’d love to hear more about your Authelia setup. I’m using Authentik, but planning to do the same thing. I haven’t opened my server up to the Internet yet (just built it on Friday), but what I’d like to do is have a webserver that supplies a login page, and you can’t access anything else until you’ve logged in

      • @Gooey0210@sh.itjust.works
        link
        fedilink
        English
        21 year ago

        I’m a Nixos user, I wouldn’t be much help unless you do Nixos. But it’s a whole new rabbit hole which would take you months/years to learn and setup 😅

        What I can say, you can do “access from home network”, “access from VPN network”, “1fa/2fa from the internet” OR “access for / and /api, but 1fa/2fa for stuff like /admin, /admin-settings, or just /login or /logged-in”

        Fail2ban is fun, also maybe have a look at crowdsec

        • @SaintWacko@midwest.social
          link
          fedilink
          English
          11 year ago

          Ah, yeah, I’m running Proxmox. And I’m definitely seeing I have a lot of research to do before I open up to the internet!

          • @Gooey0210@sh.itjust.works
            link
            fedilink
            English
            11 year ago

            I’m actually not from the “close everything, don’t open ports, always sit behind cloudflare” camp

            We selfhost so we can use and share our services

            There are other things we can practice instead of just isolationism and keeping everything as simple as possible

  • Pika
    link
    fedilink
    English
    26
    edit-2
    1 year ago

    My security is fairly simplistic but I’m happy with it

    • software protection

      • fail2ban with low warning hold
      • cert based login for ssh (no password Auth)
      • Honeypot on all common port numbers, which if pinged leads to a permanent IP ban
      • drop all firewall
      • PSAD for intrusion/scanning protection (so many Russian scanners… lol)
      • wireguard for VPN to access local virtual machines and resources
      • external VPN with nordVPN for secure containers (yes I know nord is questionable I plan to swap when my sub runs out)
    • physical protection

      • luksCrypt on the sensitive Data/program Drive ( I know there’s some security concerns with luksCrypt bite me)
      • grub and bios locked with password
      • UPS set to auto notify on power outage
      • router with keep alive warning system that pings my phone if the lab goes offline and provides fallback dns
    • things I’ve thought about:

      • a mock recovery partition entry that will nuke the Luks headers on entry (to prevent potential exploit getting through grub)
      • removing super user access completely outside of local user access
      • Pika
        link
        fedilink
        English
        3
        edit-2
        1 year ago

        I just expanded the existing fail2ban config on the commonly used default ports such as 22, 21 Etc, any requests on those ports get sent into purgatory, so the ip gets blacklisted any connections from it hangs until it times out. It’s a super basic setup iptables logs whenever a request is not in the current firewall (last rule in the chain) and then fail2ban reads the log and handles the block. I don’t count it as part of the normal setup because they’re isolated Because the actual ports the service is on still have the normal rule set but the default port numbers are just an instant if there’s activity on it you’re gone

  • @lntl@lemmy.ml
    link
    fedilink
    English
    21 year ago

    npftables blocks all incoming except a particular set of ips. any connections from those ips hit pubkey authentication.

    I’ve never had a problem