Im using linux for ±3 yrs and im pretty used to it. Im currently running nixos on my laptop. My question is what kind of hardening do i need firejail, apparmor, selinux, … all 3 of them ? none of them ? Thanks for the advice and have a nice day
Linux is fairly secure out the box and typically does not need any sort of extra hardening for most people unless you have a specific case you are worried about or some threat model that requires it. And hardening a system is not simply about installing some package, but more about learning to setup and utilise said packages to mitigate the threats you think you are going to be dealing with. Hardening a system generally comes with tradeoffs and these are not always worth the cost involved for what you get from them. All depends on what types of threats you think you will face - a journalist in a hostile country is going to want a far more secure system and will be more willing to compromise on other aspects to get that then some grandma that just wants to look at pictures on facebook. Both of these will want different tradeoffs for their systems.
Generally speaking I would start by reading up more about hardening linux systems, and what types of things these tools are designed to do. I would start with anything related to the system you are interested in, nixos has its own guides general security which links to many things you might want to think about. Arch Linux also has some good guides on security that are worth a read. And there is more general stuff like The Practical Linux Hardening Guide or redhats guides though these are more server focused and might offer tips that can be too restrictive for desktop systems.
As for apparmor and selinux, these are competing technologies and I don’t think you can use both at once.
Thanks for your anwser i will look into your links!!!
You can use Lynis to scan your system for settings or weird behavior, it’s pretty useful, some stuff don’t have great explainations however… so you will need to do a bit of research to know why a certain setting should be turn off or stuff like that
You’re off to a good start, I’d recommend reading through and following this guide, its the best resource out there at the moment for Linux hardening/security imo.
Start with lynis and go from there. Also
lsof -ni
and disable things that you don’t need.Lynis will help you to comply with cis benchmarks, which are another thing you should read through.
You could use a hardened kernel. I don’t remember exactly how to set it up, but look it up like Nixos hardened kernel.
Removed by mod
Removed by mod
grapheneX https://github.com/grapheneX/grapheneX Unrelated to grapheneOS