diff --git a/debian12-basic.yml b/debian12-basic.yml index 1aacc55..00cbe32 100644 --- a/debian12-basic.yml +++ b/debian12-basic.yml @@ -16,6 +16,7 @@ pkg: - htop - unp + - ufw - name: Create swap file command: dd if=/dev/zero of={{ swapfile_path }} bs=1M count={{ swapfile_size }} @@ -47,4 +48,27 @@ opts: "sw,nofail" dump: "0" passno: "0" - state: "present" \ No newline at end of file + state: "present" + +- name: Allow all access to tcp port 22 + community.general.ufw: + rule: allow + port: '22' + proto: tcp + +- name: Allow all access to tcp port 80 + community.general.ufw: + rule: allow + port: '80' + proto: tcp + +- name: Allow all access to tcp port 443 + community.general.ufw: + rule: allow + port: '443' + proto: tcp + +- name: Allow everything and enable UFW + community.general.ufw: + state: enabled + policy: reject \ No newline at end of file