Introduced to NetBSD 2.0 as the package security/pflkm.
From NetBSD 3.0 on, PF is in the base system
Your kernel configuration file needs these non-default options:
pseudo-device pf # PF packet filter pseudo-device pflog # PF log interface
Add to /etc/rc.conf:
pf=YES pflogd=YES
NetBSD$ sudo modload /usr/lkm/pf.o;
or
NetBSD$ sudo pfctl -e
NetBSD$ sudo /etc/rc.d/pf start ; sudo /etc/rc.d/pflogd start
in /etc/lkm.conf:
/usr/lkm/pf.o - - - - BEFORENET
Also see NetBSD PF pages.