OpenBSD: pf
This commit is contained in:
parent
ecd7cd1085
commit
50226e2055
2 changed files with 44 additions and 0 deletions
1
files.sh
1
files.sh
|
@ -54,6 +54,7 @@ fi
|
|||
if [ "$PREFIX" = 'openbsd' ]; then
|
||||
echo
|
||||
install_file openbsd root wheel 644 '/etc/man.conf'
|
||||
install_file openbsd root wheel 644 '/etc/pf.conf'
|
||||
install_dir root wheel 755 '/etc/profile.d'
|
||||
install_file openbsd root wheel 644 '/etc/profile.d/autotools.sh'
|
||||
install_file openbsd root wheel 644 '/etc/shells'
|
||||
|
|
43
openbsd/etc/pf.conf
Normal file
43
openbsd/etc/pf.conf
Normal file
|
@ -0,0 +1,43 @@
|
|||
# $OpenBSD: pf.conf,v 1.4 2018/07/10 19:28:35 henning Exp $
|
||||
#
|
||||
# See pf.conf(5) for syntax and examples.
|
||||
# Remember to set net.inet.ip.forwarding=1 and/or net.inet6.ip6.forwarding=1
|
||||
# in /etc/sysctl.conf if packets are to be forwarded between interfaces.
|
||||
|
||||
# increase default state limit from 100'000 states on busy systems
|
||||
#set limit states 500000
|
||||
|
||||
set skip on lo
|
||||
|
||||
# filter rules and anchor for ftp-proxy(8)
|
||||
#anchor "ftp-proxy/*"
|
||||
#pass in quick inet proto tcp to port ftp divert-to 127.0.0.1 port 8021
|
||||
|
||||
# anchor for relayd(8)
|
||||
#anchor "relayd/*"
|
||||
|
||||
block return # block stateless traffic
|
||||
pass # establish keep-state
|
||||
|
||||
# rules for spamd(8)
|
||||
#table <spamd-white> persist
|
||||
#table <nospamd> persist file "/etc/mail/nospamd"
|
||||
#pass in on egress inet proto tcp from any to any port smtp \
|
||||
# divert-to 127.0.0.1 port spamd
|
||||
#pass in on egress proto tcp from <nospamd> to any port smtp
|
||||
#pass in log on egress proto tcp from <spamd-white> to any port smtp
|
||||
#pass out log on egress proto tcp to any port smtp
|
||||
|
||||
|
||||
#block in quick from urpf-failed to any # use with care
|
||||
|
||||
# rules for vmd(8) - NAT and DNS forwarding for VMs (100.64.0.0/10 default)
|
||||
pass out on egress from 100.64.0.0/10 to any nat-to (egress)
|
||||
pass in proto udp from 100.64.0.0/10 to any port domain \
|
||||
rdr-to 1.1.1.1 port domain
|
||||
|
||||
# By default, do not permit remote connections to X11
|
||||
block return in on ! lo0 proto tcp to port 6000:6010
|
||||
|
||||
# Port build user does not need network
|
||||
block return out log proto {tcp udp} user _pbuild
|
Loading…
Reference in a new issue