swee

swee / pf.conf

Last active 2 hours ago

Like 0

Revision 7fbf2ac703ddfe1c1dde64a75eacd3aa2cf3b44a

pf.conf Raw
1jail_net = "192.168.123.0/24"
2jail_net6 = "fd42:1234:5678:1::/64"
3vpn_net = "10.8.0.0/24"
4
5set skip on lo
6
7# NAT so jails can access internet
8nat on wg0 inet from $jail_net to any -> (wg0)
9nat on em0 inet from $jail_net to any -> (em0)
10
11# IPv6 NAT
12nat on wg0 inet6 from $jail_net6 to any -> (wg0)
13nat on em0 inet6 from $jail_net6 to any -> (em0)
14
15# VPN NAT
16nat on wg0 inet from $vpn_net to any -> (wg0)
17nat on em0 inet from $vpn_net to any -> (em0)
18
19# Forward games ports to its jail (and route to em0)
20rdr pass on em0 proto udp from any to any port 30000:40000 -> 192.168.123.11 port 30000:40000
21rdr pass on em0 proto tcp from any to any port 30000:40000 -> 192.168.123.11 port 30000:40000
22pass in quick on bridge1 route-to (em0 10.0.0.1) from 192.168.123.11 to any keep state
23
24pass in all
25pass out all