How To Install And Enable AppArmor For LMDE 3 Cindy 64Bit

RonaldQuilao
  8 months ago
  -1

Note1: It is assumed in this tutorial that you have just installed your Linux Mint Debian Edition 3, Cindy 64bit on your computer. and that, you haven't done anything else yet, other than installing all the system updates through your update manager.

Note2: The actual commands that you will need to type in the terminal are the one's in "red fonts" make sure to type it exactly as how it is shown here. these commands are case sensitive.

STEP 1: Install all the System Updates Through Your Update Manager.
after installing all the system updates, close your update manager.


STEP 2: Make Sure That Your UFW Firewall is "INACTIVE" to prevent
any issues or conflict. (you can turn it on later after your apparmor is installed and activated)


STEP 3: Open Up Your Terminal, Press "ctrl+alt+t" and from terminal,
type the following commands below. (Press Enter after typing each line of these commands)

sudo apt-get install apparmor #Press Enter After
sudo apt-get install apparmor-profiles #Press Enter After
sudo apt-get install apparmor-profiles-extra #Optional but HIGHLY RECOMMENDED
sudo apt-get install apparmor-utils #Press Enter After

STEP4: Adding Parameters To The Kernel And GRUB To Enable AppArmor.
sudo perl -pi -e 's,GRUB_CMDLINE_LINUX="(.*)"$,GRUB_CMDLINE_LINUX="$1 apparmor=1 security=apparmor",' /etc/default/grub #Press Enter After, remove double spaces

STEP5: Updating Your GRUB
sudo update-grub #Press Enter After

STEP6: Restart Your Computer
Congratulations! You Have Successfully Installed Your AppArmor :) Now, proceed to the next series of steps below to check and verify if your AppArmor is actively Protecting you.

STEP7: Turn On Your Firewall
AppArmor works best in conjunction with other security measures in place, such as the built in Firewall from Your Linux Mint Debian. you can think of your firewall as your first line of defense, in the sense that it guards all ports, (entry) points to your computer. if something is compromized or gets past your firewall, then The AppArmor is there as your second line of defence. the reality is, computer security is
really a complex topic but the point is, you want to get as much security layers whenever
possible on your system.

To Enable Your Firewall Simply Type the following on your terminal.
sudo ufw enable #Press Enter
sudo ufw status verbose #should say firewall is active and default deny incoming allow outgoing

 

MULTIPLE WAYS TO VERIFY IF YOUR APPARMOR INSTALLATION IS SUCCESSFULL AND ACTIVELY PROTECTING YOU:

Method 1: (Shortest and easiest)
sudo systemctl status apparmor.service #It should say loaded, active, and SUCCESS.

Method 2:
Using The AppArmor Itself
sudo aa-status #It should say "loaded" and should show you a list of profiles
and services that it has currently monitored, or confined

Method 3:
(More Detailed, as this will show you the state of other services running on your system)
sudo systemctl list-units --all #look for "apparmor.service" it should say "loaded" and "active

SOURCE: https://www.debian.org/doc/manuals/debian-handbook/sect.apparmor.en.html