aboutsummaryrefslogtreecommitdiffstats
path: root/templates/etc_pf.conf.j2
diff options
context:
space:
mode:
Diffstat (limited to 'templates/etc_pf.conf.j2')
-rw-r--r--templates/etc_pf.conf.j210
1 files changed, 10 insertions, 0 deletions
diff --git a/templates/etc_pf.conf.j2 b/templates/etc_pf.conf.j2
index 0b5a756..0bb7fef 100644
--- a/templates/etc_pf.conf.j2
+++ b/templates/etc_pf.conf.j2
@@ -1,10 +1,20 @@
lan_if = "lan0"
wan_if = "wan0"
+jail_ingress_ip = "{{ jail_ingress_ip }}"
# Default policy
set skip on lo
set block-policy return
scrub in
+
+# Redirect HTTP to ingress jail
+# TODO: fix these redirects, they seem to not work
+rdr on $wan_if proto tcp from any to ($wan_if) port 80 -> $jail_ingress_ip port 80
+rdr on $wan_if proto tcp from any to ($wan_if) port 443 -> $jail_ingress_ip port 443
+rdr on $lan_if proto tcp from any to ($lan_if) port 80 -> $jail_ingress_ip port 80
+rdr on $lan_if proto tcp from any to ($lan_if) port 443 -> $jail_ingress_ip port 443
+
+# Default block all
block in all
# Allow all outbound traffic