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!

@MTK@lemmy.world
link
fedilink
English
06M

One day I will setup my security onion, but I’m procrastinating

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.

I understand some of these words.

@notgold@aussie.zone
link
fedilink
English
56M

all buzz :P

Presi300
link
fedilink
English
2
edit-2
6M

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.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
16M

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

Presi300
link
fedilink
English
16M

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

@chayleaf@lemmy.ml
link
fedilink
English
6
edit-2
6M
  • 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
@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
16M

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

@chayleaf@lemmy.ml
link
fedilink
English
15M

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.

@refreeze@lemmy.world
link
fedilink
English
16M

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.

@tapdattl@lemmy.world
link
fedilink
English
26M

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

@refreeze@lemmy.world
link
fedilink
English
26M

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

@chayleaf@lemmy.ml
link
fedilink
English
15M

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

JustEnoughDucks
link
fedilink
English
16M

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 😅

@easeKItMAn@lemmy.world
link
fedilink
English
56M

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
@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
26M

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?

@easeKItMAn@lemmy.world
link
fedilink
English
0
edit-2
6M

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 :)

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

@easeKItMAn@lemmy.world
link
fedilink
English
66M

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

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 :)

@easeKItMAn@lemmy.world
link
fedilink
English
26M

Guessing it is more a habit from back in time when ssl certification wasn’t common. Panic of MITM attacks, friends sharing their trusted access to other friends, etc. all contributed to my actual status of paranoia.
Don’t make me reconsider my cybersec approach ;)

You could always add another layer ;D

@Decronym@lemmy.decronym.xyz
bot account
link
fedilink
English
10
edit-2
5M

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

Fewer Letters More Letters
AP WiFi Access Point
CA (SSL) Certificate Authority
DNS Domain Name Service/System
Git Popular version control system, primarily for code
HTTP Hypertext Transfer Protocol, the Web
HTTPS HTTP over SSL
IP Internet Protocol
NAT Network Address Translation
PiHole Network-wide ad-blocker (DNS sinkhole)
SBC Single-Board Computer
SSH Secure Shell for remote terminal access
SSL Secure Sockets Layer, for transparent encryption
TLS Transport Layer Security, supersedes SSL
VPN Virtual Private Network
nginx Popular HTTP server

15 acronyms in this thread; the most compressed thread commented on today has 16 acronyms.

[Thread #493 for this sub, first seen 6th Feb 2024, 16:55] [FAQ] [Full list] [Contact] [Source code]

RedFox
link
fedilink
English
9
edit-2
6M

I’m an enterprise guy, so that’s the explanation for non home use things.

  • VPN for anything not my web or certificate revocation distribution point
  • Sophos IPS
  • sophos utm for web application firewall
  • transparent inline web proxy, sophos is doing https inspection. I have internal CA and all clients trust it. I don’t inspect medical or banking, other common sense stuff.
  • heavily vlan segmented with firewall between
  • my windows clients are managed by active directory with heavy handed GPOs.
  • least priv accounts, different accounts for workstation admin, server, domain, network devices
  • security Onion IDS
  • separate red forest that has admin accounts for my management access and accounts on devices
  • trellix antivirus and global reputation based file monitoring
  • I’ve started applying disa STIGs on servers
  • site to site VPN with other family member household. They get managed trellix av also.
  • my public identity accounts like MS,.Google, etc all need 2fa, token, etc.

I bet this can still get exploited, just would take effort hopefully none does for a home network.

I’m still one shitty windows zero day click away from getting my workstation or browser tokens owned though, I can feel it.

@shadowintheday2@lemmy.world
link
fedilink
English
12
edit-2
6M

deleted by creator

RedFox
link
fedilink
English
16M

Ha yeah.

Id say the same for trellix.

You should try doing things with installs or updating apps when the edr product blocks write access to all temp locations. You have to do an exclusion for every installer, signing cert, or turn it off to install programs.

RedFox
link
fedilink
English
66M

Also laughing because that’s how some companies get owned, IP stolen, etc.

There has to be balance, if your life using their system sucks so hard you can’t do your job or meet production marks, you get creative.

My industry has to prioritize security over productivity. It’s almost impossible to get work done.

@shadowintheday2@lemmy.world
link
fedilink
English
2
edit-2
6M

deleted by creator

RedFox
link
fedilink
English
26M

Your working environment sounds gross :)

IT is hard. Finding good IT people is harder in my opinion. Working for a company that is not super squared away with good security and great usability sucks. At least you found some work arounds and are trying to do it well.

@shadowintheday2@lemmy.world
link
fedilink
English
1
edit-2
6M

deleted by creator

@XTornado@lemmy.ml
link
fedilink
English
46M

I’m still one shitty windows zero day click away from getting my workstation or browser tokens owned though, I can feel it.

As somebody taking like 0% of all that measures and not having any problem, luck was involved for sure, unless they have a good reason to attack you in particular… I feel like you will be fine…

RedFox
link
fedilink
English
26M

Ha, probably. It’s fun to learn stuff though.

Working in this field, almost every company has been beached, IP stolen, etc.

Sometimes your home IP gets hit in an automated scan for a vulnerability and then auto exploited by automation. I’m hoping not to get random chance added to a botnet.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
16M

You seem to have a great setup. Since this comment touches on slightly advanced topics, I’ll ask this here:

  1. What use do you have for a WAF?
  2. How did you get your Android clients to trust your certificate? Do you use an MDM? Did you root your devices to access the trusted root store?
  3. Segmenting stuff with VLANs, subnetting and ACLs is a great idea, but do you also make sure that the firmware of the device is somewhat robust? Although I suppose you don’t have to worry about it if Sophos sends out regular updates, however I hate the idea of my switches and routers having to connect to the Internet, pass along credentials and the sort to be able to get updates.

Your measures seem to be focussed more on security than privacy - which is great! It’s my fault for not specifying it in the post, but I’d definitely like to know if you have done anything specific to keep your network private as well as secure.

Thanks for your wonderful comment - saved!

RedFox
link
fedilink
English
16M
  1. Exchange on prem 😳
  2. Both mdm,.Ms intune, and just installing the root cert manually in trusted store. You don’t have to root Android for that. It presents some warnings, appropriate.
  3. My Sophos is self contained. It does radius against active directory. It wants IPS and other updates though.

I guess the firmware is as good as possible. All network devices are just computers and can be exploited. I use a Cisco router as my actual gateway. Sophos is inline after that.

Privacy. 🤔

Not much. I have certain traffic go through a VPN to the Internet, but that’s split tunneled.

I use incognito? That doesn’t really do anything, ha.

I’m slowly killing web browser tracking and cookie stuff that group policy allows.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
16M

I didn’t know MS exchange could be used as a WAF. Will need to read more about that.

Can I host Intune completely on-prem?

What do you mean by “My Sophos is self-contained”?

Does your Cisco router get updates? My problem with these companies is that they build backdoors in their firmware for agencies to use. Are you monitoring the network usage of your Cisco gateway?

Using AD/RADIUS on-prem is an intriguing idea. I didn’t consider it because if my AD server goes down I’m essentially locked out of my services. I need to think more on this. Thanks.

RedFox
link
fedilink
English
16M

I have the older Sophos utm, which doesn’t use the Sophos cloud central manager.

I think their new firewall utm can work disconnected, but I don’t know.

Sophos has a home use license that’s free for non business use.

I love companies that do community edition or free home use.

Sophos, Veeam has nfr, Elastiflow has community edition, which is a netflow.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
16M

This is the first time I’ve come across Elastiflow, thanks for mentioning it. Seems like an intriguing service to add.

I was considering using Suricata/installing Security Onion to do IDS from the certificate from a private CA. Sophos firewall seems pretty good too.

RedFox
link
fedilink
English
26M

Sorry for confusion. I use Sophos utm as a WAF for exchange. Basically reverse proxy that is specifically programmed for exchange attacks. It allows OWA to keep working.

I put the exchange admin URL behind authentication, so you try to go to /ecp, it Sophos intercepts and make you authenticate to Sophos utm first, which is passing to ad with radius.

MS got rid of intune on prem. It’s only Azure service now. I think.

My router is my biggest vuln. Oddly the most important. It’s an enterprise ISR. It’s updated as far as possible. My paranoia ends with the US gov/NSA. I don’t care if they want back door oddly. I don’t want China using me for attack relay however.

Loads of monitoring. You do a span/mirror port to your IDS like security Onion. Let it analyze all your traffic. Apparently there are some state sponsored exploits that allow them to owe a router at kernel level and hide their activities from you and monitoring, but that’s a level I can’t deal with.

As far as lock out, you create a break glass on everything. Emergency account with non rememberable ridiculous password, saved in a safe place.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
26M

As far as lock out, you create a break glass on everything. Emergency account with non rememberable ridiculous password, saved in a safe place.

This is such a great and a simple idea. Thanks.

I think I followed your setup at a high level, but because I don’t have hands-on experience with AD I didn’t quite catch the scope of it. Thanks for letting me know, I’ll get some reading done when I get the time!

How do you all that have your services on your LAN accessing it over wireguard when external pass the wife/kids/family test? If I had to have my wife activate a VPN before she could access our nextcloud or bitwarden, she’d just never use it

@Evil_Shrubbery@lemm.ee
link
fedilink
English
66M

Is always on not an option?

always on they wouldnt know about it and if the connection failed or the wg service crashed on their phone then the services wouldn’t work. It adds a complexity that you don’t want when you’re trying to pass the wife test. Plus yes battery.

no wireguard should not decrease batterylife (see my other comment) we use wg eith always on without any problems. sometimes it stops on one phone but l9oking for the key icon and clicking the action button in the navigationcontrolmenuthingy is quite easy

Always on wireguard kills battery life on mobile for me so I guess that’s a no.

that should not be the case because wireguard only ‘runs’ when it sends or receives packets. try setting the keepalive time a bit higher, 5 minutes maybe.

It also breaks android auto for me.

My most paranoid config is disabling Ipv4

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

@dan@upvote.au
link
fedilink
English
116M

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.

@JoeKrogan@lemmy.world
link
fedilink
English
16
edit-2
6M

Only remote access by wireguard and ssh on non standard port with key based access.

Fail2ban bans after 1 attempt for a year. Tweaked the logs to ban on more strict patterns

Logs are encrypted and mailed off site daily

System updates over tor connecting to onion repos.

Nginx only has one exposed port 443 that is accessible by wireguard or lan. Certs are signed by letsencrypt. Paths are ip white listed to various lan or wireguard ips.

Only allow one program with sudo access requiring a password. Every other privelaged action requires switching to root user.

I dont allow devices I dont admin on the network so they go on their own subnet. This is guests phones and their windows laptops.

Linux only on the main network.

I also make sure to backup often.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
46M

System updates over tor connecting to onion repos.

How does this help, assuming your DNS isn’t being spoofed?

@JoeKrogan@lemmy.world
link
fedilink
English
16M

Please see my reply below with links.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
26M

Thanks, never thought of that before. I’ll certainly try it, great way to help the network!

Big P
link
fedilink
English
56M

Linux only on the main network.

Is that a security benefit?

@NOPper@lemmy.world
link
fedilink
English
46M

I guess it cuts the attack surface profile down a bit?

Semperverus
link
fedilink
English
76M

If big corporations hoovering your data should be on everyone’s threat list, then yea, i’d say its a huge benefit.

@JoeKrogan@lemmy.world
link
fedilink
English
5
edit-2
6M

Well I dont trust closed source software and do what I can to avoid it when I can. At least foss can be audited. Also all the linux devices on the main network are devices I admin.

@rekabis@lemmy.ca
link
fedilink
English
26M

Fail2ban bans after 1 attempt for a year.

Fail2ban yes; one year, however, is IMO a bit excessive.

Most ISP IP assignments do tend to linger - even with DHCP the same IP will be re-assigned to the same gateway router for quite a number of sequential times - but most IPs do eventually change within a few months. I personally use 3 months as a happy medium for any blacklist I run. Most dynamic IPs don’t last this long, almost all attackers will rotate through IPs pretty quickly anyhow, and if you run a public service (website, etc.), blocking for an entire year may inadvertently catch legitimate visitors.

Plus, you also have to consider the load such a large blocklist will have on your system, if most entries no longer represent legitimate threat actors, you’ll only bog down your system by keeping them in there.

Fail2ban can be configured to allow initial issues to cycle back out quicker, while blocking known repeat offenders for a much longer time period. This is useful in keeping block lists shorter and less resource-intensive to parse.

@JoeKrogan@lemmy.world
link
fedilink
English
16M

My block list is very small actually due to the non standard ssh port. Everything else goes through wireguard.

If it was open to the public then yes I’d have to reconsider the ban length.

@rekabis@lemmy.ca
link
fedilink
English
16M

That makes a lot more sense for your setup, then.

@constantokra@lemmy.one
link
fedilink
English
86M

Can you explain why you use onion repos? I’ve never heard of that, and I’ve heard of kind of a lot of things.

@JoeKrogan@lemmy.world
link
fedilink
English
8
edit-2
6M

Onion repositories are package repositories hosted on tor hidden services. The connection goes through six hops and is end to end encrypted. In addition to further legitimizing the tor network with normal everyday usage it has the benefit of hiding what packages have been installed on a system.

Here are some notes about them if you want to read more.

https://blog.torproject.org/debian-and-tor-services-available-onion-services/

https://www.whonix.org/wiki/Onionizing_Repositories

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
16M

That is very interesting, thanks!

@constantokra@lemmy.one
link
fedilink
English
26M

That’s pretty neat. I might start doing that, just for kicks.

Baut [she/her] auf.
link
fedilink
English
7
edit-2
6M

With Debian it’s just the apt-tor package, and the project maintains an official list at… onion.debian.org iirc?
I don’t know if serving onion traffic is more expensive for Debian/mirror maintainers so idk if this is something everybody should use

Tinyssh in a ssh user, su from there. I see privilege management in openssh as potential vulneranility.

Following for my own edification!

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
46M

Hope I get a lot of good answers!

Lemmy Tagginator
bot account
link
fedilink
-26M

New Lemmy Post: What are the most paranoid network/OS security measures you’ve implemented in your homelab? (https://lemmy.world/post/11633868)
Tagging: #SelfHosted

(Replying in the OP of this thread (NOT THIS BOT!) will appear as a comment in the lemmy discussion.)

I am a FOSS bot. Check my README: https://github.com/db0/lemmy-tagginator/blob/main/README.md

Nice try, attacker trying to get me to do their reconnaissance work for them. I’m on to you.

Spfff me, never Anyway please tell me more about your IP adress and your private keys.

@ripcord@lemmy.world
link
fedilink
English
76M

Hey its me your friend Aaron how are you. Hey i was just wandering, what is your credit card details again? just wandering

@Auli@lemmy.ca
link
fedilink
English
86M

Ok my ip address is 192.168.3.200.

Im gonna hack u now

My private key has a 3 in it

“I’m in”

@JoeKrogan@lemmy.world
link
fedilink
English
26M

Hackerman

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
196M

It would be funny if that were the case. I was just hoping to be a little more paranoid from you lot and maybe improve on the things I’ve thought about

Yeah, just having a little fun in the role of a paranoid admin. My setup isn’t worth mentioning since it fits my threat model (i.e. nobody gives a shit about my network, just don’t be the low hanging fruit) but I’m interested in other replies. Hope you get some useful responses here.

@MigratingtoLemmy@lemmy.world
creator
link
fedilink
English
96M

I’d love to play paranoid admin over my network. Thanks!

@hakunawazo@lemmy.world
link
fedilink
English
13
edit-2
6M

No, honestly I’m not an attacker, but your local bank. We just need your help to update our systems. Please provide us the following credentials to continue using our phish- *ugh* services.

Credit card number: _____________
CVV: ___
Expiration date: ______

Create a 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!

  • 1 user online
  • 128 users / day
  • 376 users / week
  • 962 users / month
  • 4.08K users / 6 months
  • 1 subscriber
  • 3K Posts
  • 51.6K Comments
  • Modlog