mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2024-11-22 07:20:05 +00:00
Added fail2ban & properly setup UFW
This commit is contained in:
parent
6eabfaac36
commit
95bf7557ef
@ -24,6 +24,7 @@
|
||||
- nginx
|
||||
- tor
|
||||
- ufw
|
||||
- fail2ban
|
||||
- htop
|
||||
- zsh # :D
|
||||
- python3-certbot-nginx
|
||||
|
@ -16,3 +16,18 @@
|
||||
rule: allow
|
||||
port: '443'
|
||||
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
|
8
templates/fail2ban/jails.local
Normal file
8
templates/fail2ban/jails.local
Normal file
@ -0,0 +1,8 @@
|
||||
[sshd]
|
||||
enabled = true
|
||||
|
||||
[nginx-http-auth]
|
||||
enabled = true
|
||||
|
||||
[nginx-botsearch]
|
||||
enabled = true
|
Loading…
Reference in New Issue
Block a user