commit a8b2cd4853a3d2604eab2ee6d72f681244476faa Author: olli Date: Sun Jul 10 10:50:58 2022 +0200 first commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/firewall.yml b/firewall.yml new file mode 100644 index 0000000..43af979 --- /dev/null +++ b/firewall.yml @@ -0,0 +1,29 @@ +--- + +- name: Firewall with ufw + hosts: all + tasks: + - name: Install Basic Packages + apt: + name: + - ufw + update_cache: no + install_recommends: no + + - name: Allow all access to tcp port 22 (ssh) + community.general.ufw: + rule: deny + port: '22' + proto: tcp + + - name: Allow all access to tcp port 33 (ssh) + community.general.ufw: + rule: allow + port: '33' + proto: tcp + + - name: Deny everything per policy and enable UFW + community.general.ufw: + state: enabled + policy: deny +