open-cmmc-stack/ansible/roles/secure_ubuntu/tasks/firewall.yml

17 lines
242 B
YAML

---
- name: Install UFW firewall
apt:
name: ufw
state: present
- name: Set UFW default deny policy
ufw:
state: enabled
policy: deny
- name: Allow SSH through firewall
ufw:
rule: allow
port: "22"
proto: tcp