aboutsummaryrefslogtreecommitdiffstats
path: root/tasks
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-06-23 14:42:09 +0300
committerJan Tuomi <jan@jantuomi.fi>2025-06-23 14:45:50 +0300
commitfbe2f24e25f510c61556e052f71611277a68e1b2 (patch)
treed5a4ff7f17d50c21a7ed5e11c61b7d77178f385b /tasks
parent41237d7d8bd8de160df93ae583cf6296039283c1 (diff)
Add pf rules
Diffstat (limited to 'tasks')
-rw-r--r--tasks/network.yml18
1 files changed, 18 insertions, 0 deletions
diff --git a/tasks/network.yml b/tasks/network.yml
index 5a59e30..2a4ec23 100644
--- a/tasks/network.yml
+++ b/tasks/network.yml
@@ -40,3 +40,21 @@
- name: Disable syslogd remote listening
shell: sysrc syslogd_flags="-s" && service syslogd restart
+
+- name: Configure pf
+ template:
+ src: etc_pf.conf.j2
+ dest: /etc/pf.conf
+ owner: root
+ group: wheel
+ mode: "0644"
+ backup: yes
+
+- name: Enable and start pf
+ service:
+ name: pf
+ enabled: true
+ state: started
+
+- name: Reload pf rules
+ shell: pfctl -f /etc/pf.conf