PF doesn't work

Hello.

I was going to use the PF on my FreeBSD 10.2 amd64 system, so I downloaded the source for it, added the ALTQ options to the kernel, built and installed it.
Code:
device pf
device pflog
device pfsync

options         ALTQ
options         ALTQ_CBQ
options         ALTQ_RED
options         ALTQ_RIO
options         ALTQ_HFSC
options         ALTQ_PRIQ
options         ALTQ_NOPCC
I added this to rc.conf:
Code:
pf_rules="/etc/pf.conf"
pf_enable="NO"
pf_flags=""
pflog_enable="YES"
pflog_log="/var/log/pflog"
pflog_flags=""

The pf_enabled="NO" is correct, if I do a mistake or something the firewall won't start again when the server reboots.

The firewall rules are also correctly placed under /etc/pf.conf.

After that I rebooted the server and connected again, then I tried to start PF with pfctl -e but it gives me this error:
Code:
pfctl -e
pfctl: /dev/pf: No such file or directory
tried the onestart also:
Code:
/etc/rc.d/pf onestart
kldload: can't load pf: module already loaded or in kernel
/etc/rc.d/pf: WARNING: Unable to load kernel module pf
and kldload(8):
Code:
kldload pf
kldload: can't load pf: module already loaded or in kernel
I already used the search on the board/google but found no solution for my problem. Hopefully someone knows how to solve this issue.
 
Unless you're sure you will need ALTQ (under normal home use ALTQ is next to useless) you can just use the pf modules bundled with the system, saves your from fiddling with custom kernels.
 
Back
Top