xref: /openbsd/etc/examples/pf.conf (revision 09467b48)
1#	$OpenBSD: pf.conf,v 1.4 2018/07/10 19:28:35 henning Exp $
2#
3# See pf.conf(5) for syntax and examples.
4# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1
5# in /etc/sysctl.conf if packets are to be forwarded between interfaces.
6
7# increase default state limit from 100'000 states on busy systems
8#set limit states 500000
9
10set skip on lo
11
12# filter rules and anchor for ftp-proxy(8)
13#anchor "ftp-proxy/*"
14#pass in quick inet proto tcp to port ftp divert-to 127.0.0.1 port 8021
15
16# anchor for relayd(8)
17#anchor "relayd/*"
18
19block return	# block stateless traffic
20pass		# establish keep-state
21
22# rules for spamd(8)
23#table <spamd-white> persist
24#table <nospamd> persist file "/etc/mail/nospamd"
25#pass in on egress inet proto tcp from any to any port smtp \
26#    divert-to 127.0.0.1 port spamd
27#pass in on egress proto tcp from <nospamd> to any port smtp
28#pass in log on egress proto tcp from <spamd-white> to any port smtp
29#pass out log on egress proto tcp to any port smtp
30
31
32#block in quick from urpf-failed to any	# use with care
33
34# rules for vmd(8) - NAT and DNS forwarding for VMs (100.64.0.0/10 default)
35#pass out on egress from 100.64.0.0/10 to any nat-to (egress)
36#pass in proto udp from 100.64.0.0/10 to any port domain \
37#    rdr-to $dns_server port domain
38
39# By default, do not permit remote connections to X11
40block return in on ! lo0 proto tcp to port 6000:6010
41