jay16213 / ns_project5

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

NS Mini Project 5

Environment

  • Ubuntu 18.04

Install SELinux on Ubuntu

Step 1 - Update the system

sudo apt update

Step 2 - Remove AppArmor

Stop AppArmor using systemctl

sudo systemctl stop apparmor

Purge AppArmor

sudo apt purge apparmor

Update the system

sudo apt update && sudo apt upgrade -yuf

Reboot

sudo reboot

Step 3 - Install SELinux

Install the SELinux package along with supporting packages

sudo apt install selinux selinux-utils selinux-basics auditd audispd-plugins

Verify the lnstallation

sudo sestatus

The status of SELinux should be disabled at this step

Reboot

sudo reboot

Log back to your machine via ssh

ssh username@ip_addr

Verify the status of SELinux

sudo sestatus

The output should be similar to the follow figure

status

Enforce SELinux

sudo setenforce 1

After enforcing SELinux, sudo sestatus will output which is the similar to the following figure

enforce

Write the rule for the SPEC

About