aboutsummaryrefslogtreecommitdiffstats
path: root/templates/ingress
diff options
context:
space:
mode:
authorJan Tuomi <jan@jantuomi.fi>2025-11-13 18:45:10 +0200
committerJan Tuomi <jan@jantuomi.fi>2025-11-13 18:45:10 +0200
commit28379e016d4ab80a0d0529d6ca08083c75a0be4d (patch)
treeadf5c7edbf5903de6d7023db200bbd74172a41c4 /templates/ingress
parent1df3d09ae131bf4709820205b562a04c22bdd85b (diff)
WIP
Diffstat (limited to 'templates/ingress')
-rw-r--r--templates/ingress/etc_pf.conf.j213
1 files changed, 7 insertions, 6 deletions
diff --git a/templates/ingress/etc_pf.conf.j2 b/templates/ingress/etc_pf.conf.j2
index c8045fd..3cdad6e 100644
--- a/templates/ingress/etc_pf.conf.j2
+++ b/templates/ingress/etc_pf.conf.j2
@@ -3,17 +3,18 @@
# Interfaces & nets
lan = "epl{{ jail.num }}b"
wan = "epw{{ jail.num }}b"
-lan_net = "{{ lan_ipv4_cidr }}"
+lan_net = "{{ lan_ipv4_network }}"
# Keep PF out of loopback, drop by default if you add blocks later
set skip on lo0
set block-policy drop
-# NAT: translate LAN traffic to the WAN interface address, and log it
-nat log on $wan from $lan_net to any -> ($wan)
+# NAT: translate LAN traffic to the WAN interface address
+nat on $wan from $lan_net to any -> ($wan)
-# Allow and log the LAN traffic so NAT can happen
-pass in on $lan inet from $lan_net to any keep state
-pass out on $wan inet from $lan_net to any keep state
+# Allow all outbound traffic from the jail and LAN via both interfaces
+# NAT will be applied automatically when source is in $lan_net and going out $wan
+pass out on $wan all keep state
+pass out on $lan all keep state
{% endif %}
{% endfor %}