this post was submitted on 06 Feb 2024
182 points (99.5% liked)

Selfhosted

40113 readers
911 users here now

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!

founded 1 year ago
MODERATORS
 

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!

(page 3) 37 comments
sorted by: hot top controversial new old
[–] [email protected] 27 points 9 months ago* (last edited 9 months ago) (4 children)

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
load more comments (4 replies)
[–] [email protected] 7 points 9 months ago (3 children)

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

[–] [email protected] 2 points 9 months ago* (last edited 9 months ago) (3 children)

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

load more comments (3 replies)
load more comments (2 replies)
[–] [email protected] 0 points 9 months ago

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

[–] [email protected] 5 points 9 months ago

Air gapping? I keep a offline backup just in case.

[–] [email protected] 11 points 9 months ago* (last edited 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
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]

[–] [email protected] 6 points 9 months ago
[–] [email protected] 11 points 9 months ago (2 children)
  • 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
[–] [email protected] 3 points 9 months ago (1 children)

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.

[–] [email protected] 2 points 9 months 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.

[–] [email protected] 5 points 9 months ago (1 children)

Since you're running x86 for your router, do you actively prevent ME from trying to connect to the Internet?

[–] [email protected] 1 points 9 months ago (1 children)

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.

[–] [email protected] 3 points 9 months ago (1 children)

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

load more comments (1 replies)
[–] [email protected] 42 points 9 months ago* (last edited 9 months ago) (4 children)

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.

[–] [email protected] 2 points 9 months ago (1 children)

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.

[–] [email protected] 10 points 9 months 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.

[–] [email protected] 5 points 9 months ago (2 children)

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!

load more comments (2 replies)
load more comments (2 replies)
[–] [email protected] 18 points 9 months ago (1 children)

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.

[–] [email protected] 5 points 9 months ago

Standard and well-tested setup. Thanks for your reply!

[–] [email protected] 34 points 9 months ago* (last edited 9 months ago) (1 children)

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.

[–] [email protected] 7 points 9 months 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

[–] [email protected] 43 points 9 months ago (1 children)

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.

[–] [email protected] 7 points 9 months ago* (last edited 9 months ago)

Very nice idea, and it's quite simple too. Thanks

[–] [email protected] 13 points 9 months ago (1 children)

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.

[–] [email protected] 4 points 9 months 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

[–] [email protected] 90 points 9 months ago (3 children)

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

[–] [email protected] 14 points 9 months ago* (last edited 9 months ago)

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

[–] [email protected] 9 points 9 months ago (4 children)

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

[–] [email protected] 7 points 9 months ago

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

[–] [email protected] 8 points 9 months ago (1 children)

My private key has a 3 in it

[–] [email protected] 12 points 9 months ago (1 children)
load more comments (1 replies)
load more comments (2 replies)
[–] [email protected] 19 points 9 months ago (1 children)

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

[–] [email protected] 21 points 9 months ago (1 children)

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.

[–] [email protected] 8 points 9 months ago

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

[–] [email protected] 5 points 9 months ago (1 children)

Following for my own edification!

[–] [email protected] 4 points 9 months ago

Hope I get a lot of good answers!

load more comments
view more: ‹ prev next ›