Files
Cachy-workstation/roles/firewall/tasks/main.yml
T
2026-06-19 11:56:51 -05:00

27 lines
547 B
YAML

---
- name: Install packages needed for ufw
community.general.pacman:
name:
- ufw
- ufw-extras
state: present
- name: Configure the firewall incoming connection policy
community.general.ufw:
direction: incoming
policy: deny
- name: Configure the firewall outgoing connection policy
community.general.ufw:
direction: outgoing
policy: allow
- name: Allow incoming ports
community.general.ufw:
rule: allow
port: "22"
proto: tcp
- name: Enable UFW
community.general.ufw:
state: enabled