homelab/roles/base/tasks/firewall.yml

24 lines
397 B
YAML
Raw Normal View History

2022-05-27 20:29:27 +00:00
- name: Install the Uncomplicated Firewall
apt:
name: ufw
state: present
- name: Deny incoming traffic by default
ufw:
default: deny
direction: incoming
- name: Allow outgoing traffic by default
ufw:
default: allow
direction: outgoing
- name: Allow OpenSSH with rate limiting
ufw:
name: ssh
rule: limit
- name: Enable firewall
ufw:
state: enabled