FDD-book/examples/part-01/ch02-setting-up-your-lab/configs/pf.conf
Edson Brandi 6e6dac94fe Add book companion files under examples/
Organize companion code and materials by book part:

  part-01/      Foundations
  part-02/      Kernel & driver fundamentals
  part-03/      Character & block devices
  part-04/      Networking & storage
  part-05/      Buses & advanced topics
  part-06/      Debugging & performance
  part-07/      Real-world drivers
  appendices/   Supplementary material
  README.md     Overview and build instructions
2026-04-25 16:51:00 +00:00

17 lines
531 B
Text

# /etc/pf.conf - minimal lab firewall ruleset
#
# Companion for Chapter 2, section "Basic Hardening for Your Lab",
# Option A. Block everything inbound except SSH.
#
# Replace the "ext_if" value with the name of your external network
# interface. In a VM you'll usually see "vtnet0"; on bare metal you
# may see em0, re0, igb0, and so on. Use "ifconfig" to find out.
set skip on lo
ext_if = "em0"
tcp_services = "{ ssh }"
block in all
pass out all keep state
pass in on $ext_if proto tcp to (self) port $tcp_services keep state