4

Started off by

  1. Enabling unattended updates
  2. Enable only ssh login with key
  3. Create user with sudo privileges
  4. Disable root login
  5. Enable ufw with necessary ports
  6. Disable ping
  7. Change ssh default port 21 to something else.

Got the ideas from networkchuck

Did this on the proxmox host as well as all VMs.

Any suggestions?

(page 2) 42 comments
sorted by: hot top controversial new old
[-] gborato@alien.top 1 points 11 months ago

Cloudflare and whitelist CF ips, they publish a file

This is ofc to redirect the traffic the services that are on the cloud.

And those services reside on a separate VLAN and have their own reverse proxy on their own VM/docker whatever.

[-] Randommaggy@alien.top 1 points 11 months ago

Tailscale, expose nothing to the wider web if not actually needed.

[-] neonsphinx@alien.top 1 points 11 months ago

I just host a bunch of worthless stuff that no one wants.

[-] NotTheSharpestPenciI@alien.top 1 points 11 months ago

set up vpn and disable ssh access from outside network

[-] WillingLimit3552@alien.top 1 points 11 months ago

Disable root login covers 99.9999 percent of it, as long as your box has only one or two obscure login accounts.

[-] Daniel15@alien.top 1 points 11 months ago

If it's a Debian system, "Create user with sudo privileges" and "Disable root login" can be done during initial setup. Just leave the root password blank and it'll disable the root user and grant sudo permission to the regular user you create.

Create a separate management VLAN and use it for all your infra (web UIs of all your networking hardware, Proxmox, SSH for servers, etc).

For unattended upgrades, ensure the auto updaters are properly configured so they're used ONLY for bug and security fixes, nor for minor or major releases! Debian unattended-upgrades has good settings out-of-the-box but you may want to add any custom repos you're using. Make sure you have an email relay server configured in the Exim config, as it uses apt-listchanges to email the changelogs to you.

But above all, press the power button to turn it off and then never turn it on again. 100% unhackable.

[-] RedSquirrelFtw@alien.top 1 points 11 months ago

Anything that faces the internet I have on a separate vlan. Each system on that vlan is treated as if it was facing the internet directly, that way if one of them gets compromised the hacker will not get far trying to get into any other machines.

Rest of my network is a little more tame just for ease of access since it's only me on here.

Although at some point I do want to revisit my security protocol even locally, just in case. Hitting some kind of drive by trojan script or something within the browser is always a possibility, it could work in reverse where it connects to an external server and then accesses the rest of the network that way. I'm not aware of such trojans but I'm sure it's possible.

I do block all outbound ports except for base internet ports but a properly written malicious script would probably take that into account and use a common port like 443.

At some point I might setup a honeypot. Just need to name the VM "cryptowallet" or something like that and it would be a very fast target. If access to it is detected it would alert me and shut off the internet.

[-] AnomalyNexus@alien.top 1 points 11 months ago

Opnsense firewall at perimeter...and that's about it. Chances of anything getting in with no exposed ports is pretty slim so I don't really bother with anything more.

For SSH exposed servers/VPS I do change the port though. Cut down log noise & maybe dodge the odd portscanner or two

[-] PreppyAndrew@alien.top 1 points 11 months ago

I know this is a feature in Unifi, but disabling access from countries with know bot farms (China, India) etc.
Unless you need access to them.

[-] Make1tSoNum1@alien.top 1 points 11 months ago

With a leash. She is very hyper.

[-] gctaylor@alien.top 1 points 11 months ago

Hopes and prayers

[-] billiarddaddy@alien.top 1 points 11 months ago

Non standard ports.

Ssh keys.

Web certificates.

[-] CombJelliesAreCool@alien.top 1 points 11 months ago

Do not discount physical security, lock the doors to your house and get an enclosed rack that you can lock

[-] reviewmynotes@alien.top 1 points 11 months ago

You have a good list to start with. Consider adding sshguard or fail2ban in the short term and crowdsec in the long term. Also use lynis on Unix systems and PingCastle on AD systems and see what suggestions those make. Just a few suggestions off the top of my head.

[-] AdderallBuyersClub2@alien.top 1 points 11 months ago

Change all root usernames and passwords to “toor”

Who is going to guess that? Not me.

[-] Fergus653@alien.top 1 points 11 months ago

I hid the server under my desk. They'll never find it there!

[-] _DuranDuran_@alien.top 1 points 11 months ago

My homelab is in my garage - the storage array is the only thing I care about not losing so using ZFS encryption and Clevis + tang so it needs to be on the home network and able to contact the server to get the decryption keys.

[-] Much_Maintenance_850@alien.top 1 points 11 months ago

on the hardware side of the story.

Dont Forget to update all your firmware's and Bios for possible vital penetrations.

[-] tuanbo91@alien.top 1 points 11 months ago

Disable all incoming, use cloudflare tunnel

[-] 1leggeddog@alien.top 1 points 11 months ago

It's not visible from the internet at all, that's about it

[-] null_rm-rf@alien.top 1 points 11 months ago

Not forwarding ports. I use Tailscale Funnel.

[-] Digital_Warrior@alien.top 1 points 11 months ago

Lock and key

[-] RayneYoruka@alien.top 1 points 11 months ago

Filter incoming traffic from countries with malicious attacks :)

[-] gargravarr2112@alien.top 1 points 11 months ago
  1. Domain auth (1 place to set passwords and SSH keys), no root SSH
  2. SSH by key only
  3. Passworded sudo (last line of defence)
  4. Only open firewall hole is OpenVPN with security dialled up high
  5. VLANs - laptops segregated from servers
  6. Strict firewall rules between VLANs
  7. TLS on everything
  8. Daily update check alerts (no automatic updates, but persists until I deal with them)
  9. Separate isolated syslog server for audit trails
  10. Cold backups
load more comments (2 replies)
[-] murdaBot@alien.top 1 points 11 months ago

Don't expose unnecessary things to the internet, keep any client PCs patched, use some sort of malware protection ... and that's all you need to do.

All these VLANs are such are just overkill unless you're actively exposing things to the internet. They wind up breaking really useful stuff, especially stuff that relies on multicast.

Besides, that Chinese IoT device can't get hacked if it's not open to the 'net in the first place.

[-] lunakoa@alien.top 1 points 11 months ago

My home lab and production network are separated by a firewall.

I have backups and plans to rebuild my lab, I actually do it regularly.

My labs do risky things, I get comfortable with those things before doing it in production.

[-] Emotional_Orange8378@alien.top 1 points 11 months ago

from the internet side, I lock down ssh or administrative stuff to local network, and specific IPs, like work. inside my network, everything has a password to access, no defaults. vlans for specific use servers, etc.

[-] gscjj@alien.top 1 points 11 months ago

I use practical security measures that match my level of exposure and don't severely limit my convienience.

If your lab isn't exposed directly to the internet, at the very least update your servers from time to time, use a string root (admin users as well) password. That's more than enough.

If your lab is exposed, the same applies but update more often. Use SSH keys.

Don't go overboard - the majority of security incidents are from lack of basic security

[-] kY2iB3yH0mN8wI2h@alien.top 0 points 11 months ago

i see a lot of stuff but not a single item about securing your homelab.

[-] u35828@alien.top 0 points 11 months ago

Deny outside access to the core management interfaces. Ne'er-do-wells from the .cn domain trying to hack my router can fuck right off.

load more comments
view more: ‹ prev next ›
this post was submitted on 22 Nov 2023
4 points (100.0% liked)

Homelab

371 readers
2 users here now

Rules

founded 1 year ago
MODERATORS