What is AppArmor and how does it compare to SELinux?
IntermediateProductionFirewalls, MAC & Compliance
Answer
AppArmor (Ubuntu, Debian, SUSE) confines programs with path-based profiles in /etc/apparmor.d/, which are easier to read and write. SELinux is label-based, more granular, and covers the whole system including MLS. Both are LSMs.
sudo aa-status
sudo aa-complain /etc/apparmor.d/usr.sbin.nginx # log only
sudo aa-enforce /etc/apparmor.d/usr.sbin.nginx
sudo aa-logprof # build rules from logs
More on Firewalls, MAC & Compliance
How do ufw, firewalld, nftables and iptables relate?BeginnerConfigure ufw for a web server with SSH only from the office.BeginnerExplain firewalld zones and runtime vs permanent configuration.IntermediateWrite a minimal nftables ruleset for a server.AdvancedWhy are nftables preferred over iptables at scale?AdvancedHow do you avoid locking yourself out when changing remote firewall rules?Intermediate