aboutsummaryrefslogtreecommitdiff
path: root/ansible/roles/lxc-host/tasks/ufw.yml
diff options
context:
space:
mode:
Diffstat (limited to 'ansible/roles/lxc-host/tasks/ufw.yml')
-rw-r--r--ansible/roles/lxc-host/tasks/ufw.yml25
1 files changed, 25 insertions, 0 deletions
diff --git a/ansible/roles/lxc-host/tasks/ufw.yml b/ansible/roles/lxc-host/tasks/ufw.yml
new file mode 100644
index 0000000..1cfb50b
--- /dev/null
+++ b/ansible/roles/lxc-host/tasks/ufw.yml
@@ -0,0 +1,25 @@
+- name:
+ tags:
+ - lxc-host
+ - lxc-host-network
+ block:
+ - name: Enable UFW
+ become: yes
+ ufw:
+ state: enabled
+
+ - become: yes
+ ufw:
+ policy: allow
+ direction: outgoing
+
+ - become: yes
+ ufw:
+ policy: allow
+ direction: routed
+
+ - become: yes
+ ufw:
+ policy: deny
+ direction: incoming
+