The aim is to configure SELinux to allow access to web content served from port 82 located in the /var/www/html directory without altering or removing any files in that directory.
-
Check SELinux Status: Before making any changes, it's important to check the status of SELinux
-
Identify SELinux Context: Check the SELinux context of the /var/www/html directory to understand its current configuration
-
Set SELinux Context for Port 82: Since your web content is configured to be served from port 82, you need to update SELinux to allow access to this port.
-
Reload SELinux Policies: After making changes, it's essential to reload SELinux policies for the changes to take effect.
-
Verify Configuration: Verify that SELinux is now allowing access to port 82 and the /var/www/html directory.
-
Test Access: Finally, test access to your web content served from port 82 to ensure that SELinux is configured correctly and allowing access without any issues
Developed by: Samyuktha S
Register Number: 212222240089
sestatus
ls -Z /var/www/html
semanage port -a -t http_port_t -p tcp 82
restorecon -Rv /var/www/html
semanage port -l | grep http
Thus the program to configure SELinux is been successfully implemented.