aboutsummaryrefslogtreecommitdiffstats
path: root/roles/pf/templates/pf.conf.j2
blob: 64001cfd715cb99a4dc8ff4ba1548e80a6ac2946 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

{# pf ~~ templates/pf.conf.j2 #}

# pf ~~ /etc/pf.conf

# ========================= #
# common config. by Ansible
# ========================= #

set block-policy drop
set loginterface egress
set skip on { lo tun0 }

block all

{% for key, value in services.tcp.items() %}
pass in quick on egress proto tcp to port {{ value }}
{% endfor %}
{% for key, value in services.udp.items() %}
pass in quick on egress proto udp to port {{ value }}
{% endfor %}

# ====================== #
# sub-config. by Ansible
# ====================== #

{% include "templates/" + inventory_hostname + "/etc/pf.conf.j2" %}

# ========================= #
# out. interface by Ansible 
# ========================= #

pass out quick inet
pass in proto { icmp, icmp6 } all

remember that computers suck.