Added fail2ban & properly setup UFW

This commit is contained in:
CPunch 2022-06-08 14:23:15 -05:00
parent 6eabfaac36
commit 95bf7557ef
3 changed files with 25 additions and 1 deletions

View File

@ -24,6 +24,7 @@
- nginx
- tor
- ufw
- fail2ban
- htop
- zsh # :D
- python3-certbot-nginx

View File

@ -15,4 +15,19 @@
community.general.ufw:
rule: allow
port: '443'
proto: tcp
proto: tcp
- name: Startup UFW
community.general.ufw:
state: enabled
- name: Copy fail2ban jail config
copy:
src: templates/fail2ban/jails.local
dest: /etc/fail2ban/jail.d/jails.local
- name: Enable fail2ban service
systemd:
name: fail2ban
enabled: yes
state: restarted

View File

@ -0,0 +1,8 @@
[sshd]
enabled = true
[nginx-http-auth]
enabled = true
[nginx-botsearch]
enabled = true