- Snort on perimeter inbound and outbound.
- ntopng on perimeter.
- Heavy VLAN segmentation. Like with like.
- Inter-VLAN ACLs on core switch. This is a stateless firewall. Some VLANs with certain device types have inbound and outbound. Trusted devices only have inbound.
- SPAN to Security Onion for all internal traffic.
- SNMPv3 monitoring on all devices.
- MAC Sticky on all camera ports because the cabling extends outside of the physical structure of the house. I am going to implement Dot1X at some point.
- VRFs for sensitive infrastructure to prevent outbound routing completely.
- A VRF for devices to be forced through an external VPN (Mullvad). Used for devices that do not support a VPN agent.
- No antivirus. All antivirus is a botnet.
- All server infrastructure is Devuan using OpenRC instead of systemd.
- Gaming PC is Artix.
- DNS blackhole.
- Public DNS is a Swiss no-logging provider which I use DoT to send my queries to.
- LibreWolf or Brave Browser on everything.
- Only hole into the network is a 4096 bit encrypted Wireguard instance operating in a container using an uncommon port. I wrote a custom script that can reach into the container and pull from the API in order to show active sessions, GeoIP, browser fingerprints, length of time the socket has been open, etc.
- I use geofencing for inbound connections to the Wireguard instance. I only allow my immediate area cellular ISPs IANA address spaces to touch my network. Same goes for the geographic area surrounding my parents house.
- Unattended updates using custom scripting for my servers, including rebuilding the Wireguard container every single night, updating the server, and I also fire Nessus at it every night. If in the morning there is a CVE of note on that server, the NAT rule allowing traffic to the VPN is disabled at the perimeter until a sufficient patch is released.
- I run STIGs on everything, within reason and where infrastructure allows, in my suite.
- LibreSSL over OpenSSL.
Homelab
Rules
- Be Civil.
- Post about your homelab, discussion of your homelab, questions you may have, or general discussion about transition your skill from the homelab to the workplace.
- No memes or potato images.
- We love detailed homelab builds, especially network diagrams!
- Report any posts that you feel should be brought to our attention.
- Please no shitposting or blogspam.
- No Referral Linking.
- Keep piracy discussion off of this community
Why has no one mentioned CIS hardening.
Originally I'd change the SSH port, obviously only allow pubkey based auth.
Now however, I do everything over wireguard. Every device has Wireguard Access and depending on that different rules what they can access.
Automatic updates and strong passwords. I know that automatic update can break a system but I’ve never had it break anything super critical in my home before that can’t be fixed with 10 minutes of effort. I can think of three things that have broken and required fixing in the last 5 years of auto updating software. I’d much rather have a broke piece of software than a security breach. To those that manually update, how fast after the patch notice are you patching? One day, two days, one week, monthly? What if you are sick or on vacation? I can guarantee mine updates within 24 hours every time.
I hid the server under my desk. They'll never find it there!
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.
If your homelab local only - well all of these are unnecessary if you're the only one who uses it. If you want to expose homelab to internet - you can pretty much use VPN to connect to your homelab without needing to expose whole homelab. Just a port to connect to VPN.
Do not over complicate things
on the hardware side of the story.
Dont Forget to update all your firmware's and Bios for possible vital penetrations.
Disable all incoming, use cloudflare tunnel
Unattended updates can be tricky.
Think of config changes which need manual adjustment, or a broken update. This is something you would probably not like to happen at night without notice. Could easily break your vital systems (e.g. homeassistant, authentication, vaults...)
Not forwarding ports. I use Tailscale Funnel.
It's not visible from the internet at all, that's about it
By only having it on when I need it.
People that have theirs on 24/7....why? I used Home Assistant to automate mine so I can bring it up remotely if needed.
- strict 3-2-1 backup policy
- VLANs. all VLANs are controlled by my Fortigate FWF-61E (soon to be replaced by a FG-91G). the VLANs have strict access permissions on a per-device basis on what they can and cannot access.
- CORE network where the NAS live
- only specific devices can access this VLAN, and most only have access to the SMB ports for data access. even fewer devices have access to the NAS management ports
- this network has restrictions on how is accesses the internet
- I have strict IPS, web-filtering, DNS filtering, network level fortigate AV, deep SSL inspection, and intrusion protection activities
- everything is logged, any and all incoming and outgoing connections both to/from the internet but also any LAN based local communications.
- Guest wifi
- can ONLY access the internet
- has very restrictive web and DNS filtering
- I have strict IPS, web-filtering, DNS filtering, network level fortigate AV, basic SSL inspection, and intrusion protection activities
- APC Network Management Cards
- can ONLY access my SMTP2GO email client so it can send email notifications
- it does have some access to the CORE network (NTP, SYSLOG, SNMP)
- very select few devices can access the management ports of these cards
- I have strict IPS, web-filtering, DNS filtering, network level fortigate AV, basic SSL inspection, and intrusion protection activities
- Ethernet Switch / WIFI-AP management
-
- very select few devices can access the management ports of the switches
- ZERO internet access allowed
-
- ROKUs
- restrictive web and DNS filtering to prevent ads and tracking. Love seeing the space where ads SHOULD be and seeing a blank box.
- can access ONLY the IP of my PLEX server on the CORE network, on ONLY the PLEX port for the services PLEX requires.
- IoT devices
- Internet access ONLY except for a few devices like my IoTaWatt that needs CORE network access to my NAS on ONLY the port required for InfluxDB logging.
- Wife's computer
- because of HIPPA due to her job, i have ZERO logging, and no SSL inspection, but do have some web and DNS filtering.
- print server
- zero internet access, and only the machines that need to print can access.
- CORE network where the NAS live
- as already indicated i have a fortigate router which has next generation firewall abilities to protect my network
- while i do not have automatic updates i am notified when updates are available for my router, my NAS, the switches, and APC network cards. i always like to look at the release notes and ensure there are no known issues that can negatively impact my operations. I do have most of my docker containers auto-update using watchtower.
- i keep SSH disabled and only enable when i ACTUALLY need it, and when i do, i use certificate based authentication
- i have disabled the default admin account on ALL devices and made custom admin/root users but also have "normal" users and use those normal users for everything UNLESS i need to perform some kind of activity that requires root/admin rights.
- on all devices that have their own internal firewall, i have enabled it to only allow access from VLAN subnets that i allow, and go even further by restricting which IPs on those VLANS can access the device
- changing default ports is fairly useless in my opinion as once someone is on your network it is trivial to perform a port scan and find the new ports.
- all windows based endpoint machines
- have a strict endpoint control using fortigate's fortiguard software with EMS server. this allows me to enforce that machines have minimum specifications,
- i use group policy to enforce restrictive user environments to prevent installation of programs, making system changes, accessing the C: drive etc as this prevents a decent amount of malware from executing
- antivirus must be enabled and active or the endpoint becomes quarantined.
- if the system has unusual behavior it is automatically quarantined and i am notified to take a look
- even though the fortigate router blocks all ads and trackers i also use a combination of UBlock Origin to prevent ads and trackers from running in the browser as ADs are now one of the most common points of entry for malware
- i use ESET antivirus which also performs and ties into the fortiguard endpoint protection to ensure everything on the machines is OK
- for all phones/tablets i have Adguard installed which blocks all ads and malicious web sites and tracking at the phones level
this is not even all of it.
the big take away is i try to layer things. the endpoint devices are most important to protect and monitor as those are the foot hold something needs to then move through the network.
i then use network level protections to secure the remaining portions of the network from other portions of the network.
Replace Fortinet with Pfsense (+Suricatta/Snort) for non-propriety. (I have a Fortinet firewall and I can't bring myself to pay for their packages). One thing I'd recommend for you, as I host a lot of stuff is DNS Proxy though cloudflare, so the services I'm hosting are not pointing to my origin IP.
None of my services are available outside my house without first logging into the fortigate SSL VPN. That is the only open port I have.
The SSL VPN uses a loopback interface so only IPs from the US can access it, and I have strong auto block enabled and I add IPs of systems that try brute forcing into the box so they get blocked
I did forget to mention that I use cloud flair already for the exact reason you mentioned so my home IP is not used.
I also have a domain name with valid wildcard certificate. The domain is used to access the SSL VPN and I also then use the cert within my entire homelab so I have everything encrypted
I was not a fan of PF sense, the fortigate has more security features that I wanted
Pretty cool man, thanks for sharing.
Filter incoming traffic from countries with malicious attacks :)
- Domain auth (1 place to set passwords and SSH keys), no root SSH
- SSH by key only
- Passworded sudo (last line of defence)
- Only open firewall hole is OpenVPN with security dialled up high
- VLANs - laptops segregated from servers
- Strict firewall rules between VLANs
- TLS on everything
- Daily update check alerts (no automatic updates, but persists until I deal with them)
- Separate isolated syslog server for audit trails
- Cold backups
What are the risks of passwordless sudo? Is it mainly just if someone has physical access to the machine or if you run a malicious program?
If someone or something malicious gets a shell account on my systems, then it at least stops them doing anything system-wide. And yes, if a script is going to request admin rights to do something, it'll stop right at the sudo
prompt. Passwordless, it could do stuff without you even being aware of it.
Whether or not this is a line of defence at all is open to debate.
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
SSH shouldn’t be internet accessible Changing an SSH port won’t stop someone more than 15 seconds. Disabling ping is security through obscurity at best.
Internet > Firewall, IP Whitelist, IPS/IDS yada yada> DMZ / VLAN > > Proxmox /w FW:$true (rule only for game ports) > GameServer > Deny all traffic from GameServer to go anywhere but internet
Proxmox server has firewall, all the hosts on proxmox have firewall enabled (in proxmox). Only allow my main device to access. No VLAN crosstalk permitted.
I don't bother with anything else internally, if they're inside they deserve to SSH with my default root / password credentials
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.
Lock and key
I have a camera outside, I’m a pretty big guy, and my rack was built inside my office so it can’t be moved quickly.
Oh, you mean digital security? Lol I have a lot of subnets and don’t forward in much traffic. The WiFi password I give out gets you on my kids network. Plus I run DPI and IDS. I use cloudflare DNS (sometimes operating an internal pihole too). And I don’t browse social media on PCs only on mobile. The only holes punched from WiFi to internal are for printing. And even the wired clients are segregated from my work network.
i see a lot of stuff but not a single item about securing your homelab.
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.