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!

4 points

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.

permalink
report
reply
6 points
*
  • full disk encryption on everything except the router (no point in encrypting the router)
    • the server doesn’t have a display connected for obvious reasons, so I’m manually unlocking it via ssh on each boot
      • obviously, the SSH keys are different, so the server has a different IP in initrd. That said, I still don’t have any protection against malicious modification of initrd or UEFI
  • the server scans all new SSL certificates in realtime using certspotter and notifies me of any new certificates issued for my domains that it doesn’t know about (I use Cloudflare so it triggers relatively often, but I still do checks on who the issuer is)
  • firewall blocks outgoing 25 so nobody can impersonate my mailserver
permalink
report
reply
1 point

You might be interested in setting up network bound encryption via Clevis and Tang. I use a hidden pi zero in my house acting as a Tang server. It’s great being able to reboot any of my encrypted servers without having to manually unlock disks.

permalink
report
parent
reply
1 point

I know about it, but it kinda defeats the purpose (the purpose being police raid protection)

permalink
report
parent
reply
2 points

Do you recommend any resources about this? I’d be interested in learning how to implement this.

permalink
report
parent
reply
2 points

I’m using the recently merged Clevis module for NixOS. There was a recent talk at FOSDEM about it.

permalink
report
parent
reply
1 point

I use a similar setup, but use a USB for my boot drive that has the lvs partition encryption keyfile. I find it much handier since my computer is not near my server. I can boot and then walk upstairs and it is ready, and remove the USB later.

Then there is no way to brute force the decryption or get a password out of me. Also, when the USB is removed and put in a safe place, there is no way to modify the boot partition or UEFI either.

Then I have a password encryption on my data harddrives that I don’t know the password to, but is on my password manager.

The thing about being paranoid about this stuff is that I probably focused on the wrong thing. A smash & grab is completely protected against, but that is like a 0.1% chance anyway and a 0.1% chance on top of that 0.1% chance that it would be targeted enough that they would even try to decrypt it.

Full disk encryption is really only usefully at all for an unpowered system. Network hardening will probably take care of 99.99% of attack attempts where encryption is 0.01%.

Even for a laptop, if it gets stolen in public, it is still running and can have the keys extracted or break into the running system if someone really wants to hack it. They wouldn’t even try to reboot and break the disk encryption probably…

Too much info, but I guess I am just rambling about how dumb my approach probably is 😅

permalink
report
parent
reply
1 point

Thanks, I’d like to know more about your public-facing setup using cloudflare

permalink
report
parent
reply
1 point

there’s not much to know about it, I use Cloudflare simply because its routing is better than direct IP connections for many places on Earth. I can’t fully use Cloudflare anyway because I host many non-web services.

permalink
report
parent
reply
2 points
*

Mine’s pretty simple, I have a “don’t open ports until ABSOLUTELY NECESSARY” policy, wireguard works well enough for everything else I need to access remotely. I also keep SSH disabled on any machine that has direct access to the internet.

permalink
report
reply
1 point

Do you use a KVM to interact with machines that can access the Internet?

permalink
report
parent
reply
1 point

No, as it’s just my main desktop, my laptop and an isolated PiHole VM

permalink
report
parent
reply
5 points

I’m somewhat paranoid therefore running several isolated servers. And it’s still not bulletproof and will never be!

  • only the isolated server, ie. no internet access, can fetch data from the other servers but not vice versa.
  • SSH access key based only
  • Firewall dropping all but non-standard ports on dedicated subnets
  • Fail2ban drops after 2 attempts
  • Password length min 24 characters, 2FA, password rotation every 6 months
  • Guest network for friends, can’t access any internal subnet
  • Reverse proxy (https;443 port only)
  • Any service is accessed by a non-privileged user
  • Isolated docker services/databases and dedicated docker networks
  • every drive + system Luks-encrypted w/ passphrase only
  • Dedicated server for home automation only
  • Dedicated server for docker services and reverse proxy only
  • Isolated data/backup server sharing data to a tv box and audio system without network access via nfs
  • Offsite data/backup server via SSH tunnel hosted by a friend
permalink
report
reply
2 points

Would you have to compromise on your security according to your threat model if you ran VMs rather than dedicated devices? I’m no security engineer and I don’t know if KVM/QEMU can fit everyones needs, but AWS uses XCP-ng, and unless they’re using a custom version of it, all changes are pushed upstream. I’d definitely trust AWS’ underlying virtualisation layer for my VMs, but I wonder if I should go with XCP or KVM or bhyve.

This is my personal opinion, but podman’s networking seems less difficult to understand than Docker. Docker was a pain the first time I was reading about the networking in it.

Really like your setup. Do you have any plans to make it more private/secure?

permalink
report
parent
reply
0 points
*

I used VMs some time ago but never managed to look deeper into separation of bare metal vs VMs. Hence I can’t assess this reasonably.
Docker got me interested when it started and after discovering its networking capabilities I never looked back.
Basically I’m trying to minimize the possibility that by intercepting one dockerized service the attacker is able to start interacting with all devices. And I have lots of devices because of a fully automated house. ;) My paranoia will ensure the constant growth of privacy and security :)

permalink
report
parent
reply
5 points

Why would you rotate passsord though?
Rather choose something random and strong than changing it every 6th moon.

permalink
report
parent
reply
6 points

Rotating passwords only for web services. Vaultwarden does make it easy. Not all services allow 2FA.

permalink
report
parent
reply
2 points

Sounds still excessive but that’s what the thread is here for.
Would probably understand it more if I knew more aspects.

Cheers to more cybersec :)

permalink
report
parent
reply
42 points

My most paranoid config is disabling Ipv4

That’s it. If someone wants to attack me, they will need to adopt IPv6!

permalink
report
reply
11 points

they will need to adopt IPv6!

And find your IP in a /56 or /64 range (depending on what your ISP gives you). Good luck.

permalink
report
parent
reply

Selfhosted

!selfhosted@lemmy.world

Create post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

Community stats

  • 3.4K

    Monthly active users

  • 3.3K

    Posts

  • 71K

    Comments