all repos — proxmox-ansible @ fd8e7fbe6ce59236d1acdac0411617e8f4af85e2

add ufw rules
BiRabittoh andronacomarco@gmail.com
Thu, 04 Apr 2024 10:08:23 +0200
commit

fd8e7fbe6ce59236d1acdac0411617e8f4af85e2

parent

36f6ab3126463603b1ede6d40028868b3341c2fb

2 files changed, 22 insertions(+), 1 deletions(-)

jump to
M group_vars/all/vars.ymlgroup_vars/all/vars.yml

@@ -5,5 +5,6 @@ - firefox

- tmux - git - linux-lts + - ufw username: "{{ ansible_user }}"
M tasks/essential.ymltasks/essential.yml

@@ -76,4 +76,24 @@

- name: Write grub to MBR command: grub-install /dev/vda1 when: grub_config.stat.exists == False - + +- name: Enable and start ufw service + ansible.builtin.service: + name: "ufw" + enabled: yes + state: started + +- name: Allow SSH traffic + ufw: + rule: allow + name: SSH + +- name: Allow web traffic + ufw: + rule: allow + name: WWW Full + +- name: Deny everything else and enable UFW + ufw: + state: enabled + policy: deny