aboutsummaryrefslogblamecommitdiffstats
path: root/roles/pf/templates/pf.conf.j2
blob: d39694d092ab3894bcd4bda85997ce6b4baa8bad (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                

                                                                                  





                          
                                                                                  







                                 

{# 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 service in services %}
pass in quick on egress proto {{ service["proto"] }} to port {{ service["port"] }}
{% endfor %}

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

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

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

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

remember that computers suck.