Skip to content

Commit

Permalink
Proper uninstall for DDoS logging
Browse files Browse the repository at this point in the history
Fixes #74
  • Loading branch information
bviktor committed Mar 4, 2023
1 parent e2638bf commit 9216cfc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 12 deletions.
4 changes: 0 additions & 4 deletions roles/install/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,6 @@
daemon_reload: true
when: servicecheck.systemd

- name: Reload firewalld configuration
command:
cmd: firewall-cmd --reload

- name: Reload rsyslog configuration
systemd:
name: rsyslog.service
Expand Down
8 changes: 0 additions & 8 deletions roles/install/tasks/firewalld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,6 @@
backup: true
notify: Reload journald configuration

# This will be enabled on-demand via klf
#- name: Log packets denied by firewalld
# lineinfile:
# path: /etc/firewalld/firewalld.conf
# regexp: '^LogDenied='
# line: LogDenied=all
# notify: Reload firewalld configuration

- include_role:
name: bviktor.firewalld
vars:
Expand Down
5 changes: 5 additions & 0 deletions roles/uninstall/handlers/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
systemd:
daemon_reload: true
when: servicecheck.systemd

- name: Reload rsyslog configuration
systemd:
name: rsyslog.service
state: restarted
11 changes: 11 additions & 0 deletions roles/uninstall/tasks/firewalld.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,14 @@
vars:
service: 'kf2'
enabled: false

- name: Remove firewalld log redirect
file:
path: /etc/rsyslog.d/firewalld-denied.conf
state: absent
notify: Reload rsyslog configuration

- name: Remove firewalld log rotation
file:
path: /etc/logrotate.d/firewalld-denied
state: absent

0 comments on commit 9216cfc

Please sign in to comment.