Appendix B: Example of pf.conf file
Previous  Top  Next

# /etc/pf.conf
# Example
#

# Interface definitions
ext_if="rl2"
int_if="rl0"

# Internal network
internal_net="10.10.10.0/24"

# Popular Ports
ports_win = "{ 137, 138, 139, 445, 389, 3389 }"

ports_ptp = "{ 1044, 1045, 1214, 4329, 4661, 4662, 4665, 6346, 6347, 6666, 6667, 6699, 6700, 6701, 7668, 7788, 8311, 8888, 8889, 28864, 28865, 41170 }"

# Default Rules
pass in all
pass out all

# Block & Log incoming SSH
block in log on $ext_if proto tcp from any to $internal_net port 22

# Block windows
block in on $ext_if proto { tcp,udp } from any to $internal_net port $ports_win

# Block some outgoing peer-to-peer
block out on $ext_if proto { tcp, udp } from $internal_net to any port $ports_ptp

# Allow this SSH connection
pass in on $ext_if proto tcp from any to 1.2.3.4 port 22