| layout | default |
|---|---|
| title | 🛡️ ansible-collection-hardening - Secure Your System with Ease |
| description | 🔒 Harden your systems with this Ansible collection, streamlining security best practices for OS and SSH configurations. |
Welcome to the Ansible Collection Hardening repository. This collection helps you secure your Linux systems, ensuring that your SSH, nginx, and MySQL configurations follow best practices. Let’s get you set up to enjoy a safer computing environment.
This Ansible collection provides battle-tested hardening for various components of Linux systems. Hardening refers to the process of securing a system by reducing its surface of vulnerability. With this collection, you will efficiently manage security for:
- Linux: Enhanced settings for system security.
- SSH: Secure your remote communications.
- nginx: Safeguard your web server.
- MySQL: Protect your database configurations.
- Easy to use Ansible roles for hardening various services.
- Predefined configurations tailored for Linux systems.
- Comprehensive coverage across key services like SSH, nginx, and MySQL.
- Regular updates to keep up with the latest security practices.
- Community-supported, with contributions from various experts.
To use this Ansible collection, you need the following:
- A Linux-based operating system (e.g., Ubuntu, CentOS, Debian).
- Ansible installed (version 2.9 or later is preferred).
- Basic command-line knowledge for executing the playbooks.
-
Download the Release: Visit this page to download: Download the Latest Release.
-
Extract the Files (if necessary): If the download is a compressed file (like .zip or .tar.gz), extract it to your desired location on your system.
-
Install the Collection Using Ansible: Open your command line interface (Terminal on Linux) and run the following command:
ansible-galaxy collection install <path-to-extracted-folder>
Replace
<path-to-extracted-folder>with the path where you saved the files. -
Run the Playbooks: With the collection installed, you can now run the playbooks. Use the following command:
ansible-playbook <playbook_name>.yml
Replace
<playbook_name>.ymlwith the name of the specific playbook you wish to apply.
Once installed, you can configure each part with the provided roles in the collection. Here’s a quick breakdown of how to use them:
-
SSH Hardening: Implement the
ssh_hardeningrole by running:ansible-playbook ssh_hardening.yml
-
nginx Hardening: For the
nginx_hardeningrole, execute:ansible-playbook nginx_hardening.yml
-
MySQL Hardening: To secure your MySQL database, run:
ansible-playbook mysql_hardening.yml
Refer to the playbook documentation inside the collection for detailed parameters and options.
For detailed documentation about each role and options available, please refer to the Markdown files located in the docs directory within the collection. Each file will guide you through parameters and best practices for maximum security.
If you wish to learn more about hardening practices or contribute to the project, we encourage you to explore the following topics:
Join our community to share your experience and help others. You can find us on GitHub Discussions.
If you encounter any issues or have questions, check the open issues on the GitHub repository. This is also a great place to suggest new features or improvements.
For your convenience, you can also visit this page to download the latest version of this collection.