This repository contains Ansible playbooks for setting up an Intrusion Detection System (IDS) and other cybersecurity measures.
- Ansible installed on your control machine
- Target machines accessible via SSH
- Sudo privileges on target machines
-
Clone this repository:
git clone https://github.com/ozeliurs/ids-cyber.git cd ids-cyber -
Update the
inventory.inifile with your target machines' IP addresses and SSH credentials.
Run the playbooks in the following order:
-
iptables:
ansible-playbook -i inventory.ini iptables.yamlThis playbook configures iptables rules for basic network security.
-
proxy:
ansible-playbook -i inventory.ini proxy.yamlThis playbook sets up Apache2 with SSL and proxy configurations.
-
modsecurity:
ansible-playbook -i inventory.ini modsecurity.yamlThis playbook installs and configures ModSecurity for Apache2.
-
snort:
ansible-playbook -i inventory.ini snort.yamlThis playbook installs and configures Snort IDS.
-
fail2ban:
ansible-playbook -i inventory.ini fail2ban.yamlThis playbook sets up Fail2ban for intrusion prevention.
- Ensure that you have the necessary permissions and access to run these playbooks on your target machines.
- Review and adjust the configurations in each playbook to match your specific requirements before running them.
- It's recommended to test these playbooks in a non-production environment first.
If you encounter any issues:
- Check the Ansible output for error messages
- Verify network connectivity to your target machines
- Ensure that the target machines meet all prerequisites
- Review the logs on the target machines for more detailed error information
For more information on each playbook, refer to the comments within the YAML files.