Lab 20: Hardening
Objective
To get experience hardening a Linux server.
For this lab, you'll get experience setting up three hardening tools: fail2ban, ufw, and aide. For each, you'll install and configure the tool, and turn in a couple screenshots showing what you've done.
Part 1: fail2ban
- Install
fail2banand make sure it is enabled and started. - Monitor the log file until someone has been banned. This will probably happen within a few minutes, but if not you can login with an incorrect password a few times to trigger it.
- Include a screenshot of log showing the banned IP in your submission for this lab.
Part 2: ufw
- Install
ufwand then enable and start it. - Add rules to unblock SSH, HTTP, and HTTPS access.
- Run the
sudo ufw statuscommand and put its output into the submission.
Part 3: aide
- Install
aide. - Configure it, being sure to include a configuration line removing
/homefrom the database. - Create the initial database for your system files.
- Perform a check on the database, which should turn in no changes.
- Install any package. If you're not sure what to install
sl, the "steam locomotive" is always a good choice. Then run the check again, which should now show that files have been added. - Turn in screenshots of the two check commands.
Submitting
Submit your file containing the screenshots for the three parts in Canvas.