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

Selfhosted

39980 readers
780 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 2) 50 comments
sorted by: hot top controversial new old
[–] [email protected] 7 points 9 months ago

After reading this thread I'm apparently not paranoid enough.

Internet facing services are on their own firewalled vlan (dmz), behind a rev proxy, and I have crowdsec running on the proxy and router.

Anything that can get away with putting up on a vps I have (e.g. this Lemmy server). But some things have storage/compute requirements I'm not willing to shell out for.

[–] [email protected] 11 points 9 months ago* (last edited 9 months ago) (10 children)

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.

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

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

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

I understand some of these words.

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

all buzz :P

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

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

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

Is always on not an option?

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

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.

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

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

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

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

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

It also breaks android auto for me.

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

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.

[–] [email protected] 16 points 9 months ago* (last edited 9 months ago) (6 children)

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.

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

System updates over tor connecting to onion repos.

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

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

Please see my reply below with links.

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

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.

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

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

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

That is very interesting, thanks!

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

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

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

Linux only on the main network.

Is that a security benefit?

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

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.

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

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

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

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

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

I am clearly not paranoid enough. For a while I was running an open source router inline between the network AP and the fiber to Ethernet box and running nids but the goddamn thing kept crapping out every few days so i took it back out until I can find a more stable solution.

I have plans if I can ever get around to it. I want the smart TV, printer and other shitty things on a separate network from the more trusted devices. I don't know how yet but I would like to set up 802.1X for the trusted stuff.

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

You could not connect the TV and printer to the network but instead attach them to raspberry Pi or similar devices. This allows you full control and stops them calling home and spying.

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

I'm not super paranoid about security, but I do try to have a few good practices to make sure that it takes more than a bot scanning for /admin.php to find a way in.

  • Anything with SSH access uses key-based auth with password auth disabled. First thing I do when spinning up a new machine
  • Almost nothing is exposed directly to the Internet. I have wireguard set up on all my devices for remote access and also for extra security on public networks
  • Anyone who comes to visit gets put on the "guest" network, which is a separate subnet that can't see or talk to anything on the main network
  • For any service that supports creating multiple logins, I make sure I have a separate admin user with elevated permissions, and then create a non-privileged user that I sign in on other devices with
  • Every web-based service is only accessible with a FQDN which auto-redirects to HTTPS and has an actual certificate signed by a trusted CA. This is probably the most "paranoid" thing I do, because of the aforementioned not being accessible on the Internet, but it makes me happy to see the little lock symbol on my browser without having to fiddle around with trusting a self-signed cert.
[–] [email protected] 3 points 9 months ago (2 children)

Every web-based service is only accessible with a FQDN which auto-redirects to HTTPS and has an actual certificate signed by a trusted CA

I'm assuming this is in your internal network. The problem with this is that communication from the client to the reverse-proxy (unless you're running a reverse-proxy sandboxed with each application/are directly decrypting traffic at the base of your application) is encrypted, but the traffic from the server to the reverse-proxy is not.

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

I have Nginx Proxy Manager set up to let me access services running HTTP on other ports on the machine with a local network only access list just so my traffic even in my own network will use TLS. The likelihood that anyone is sniffing traffic on my own network is extremely small, but I’m paranoid. (Can’t let anyone see that I’m running Ubuntu Server. How embarrassing.)

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

Neat post and great comments. Saved. Thanks. :)

My personal setup includes:

  • non web facing homeserver for the juicy stuff
  • vps with stuff I‘d barely miss if it was gone
  • far too many backups
  • automatic cleanup of backups so my hdds dont fill up
  • fail2ban listening on every log, even docker containers with permaban enabled
  • scripts are root 700 and so on

I‘m aware that stuff might go horribly wrong but so far it hasnt.

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

I've got systems that can detect suspicious activities in the net, which result in a shutdown of the router. And not like "could you please shut down" but a hard power off type of shutdown.

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

Oh, you have a setup that signals to your power source to shut off internet when it detects an anomaly on the internet? That's quite specific, and I'm having trouble trying to understand the use-case here, but it's definitely included in the paranoid-list. Thanks!

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

Now that's the kind of paranoid I was hoping to see in here. High five, pal.

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

For about a year I was running a full out of band IPS on my network. My core switch was set up with port mirroring to spit out a copy of all traffic on one port so that my Suricata server could analyze it. Then, this was fed into ElasticSearch and a bunch of big data crap looked for anomalies.

It was cool. Basically useless because all it did was complain about the same IP crawler bots as my nginx logs. But fun to setup and ultimately good for my career lol.

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

The problem is, you'd expect your switch to mirror all traffic, including what it is generating (switches with web servers, baseband/backdoors like every big manufacturer), but you can never really be sure.

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

load more comments
view more: ‹ prev next ›