Skip to content

Issue 8.2: Manage SELinux #14

@AhmadMWaddah

Description

@AhmadMWaddah

Issue 8.2: Manage SELinux

VM

VM 1: Jump Host / Main Practice Server

Scenario

You need to configure SELinux to allow SSH on a non-standard port (2222) and fix file contexts for a web server document root that's causing access issues.

Objectives

  1. Change the SSH service to listen on port 2222 in addition to the default port
  2. Update the SELinux policy to allow SSH to bind to port 2222
  3. Create a test directory for a web server at /var/www/custom_html
  4. Create a test index.html file in the directory
  5. Change the SELinux context of the directory and its contents to httpd_sys_content_t
  6. Verify all configurations are correct
  7. Test SSH access on the new port

Requirements

  • Use semanage to add SSH port
  • Use setsebool if needed for SSH
  • Use restorecon or chcon to fix web content contexts
  • Verify SELinux contexts are correct
  • Test functionality after changes

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions