mirror of
https://github.com/CPunch/openpunk-ansible.git
synced 2024-12-22 14:00:04 +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
|
||||
|
@ -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
|
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