27 lines
547 B
YAML
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
|