/ Raspberry PI

Raspberry PI : Packet Filter install under FreeBSD

The ARM version of FreeBSD for Raspberry PI doesn't provide by default PacketFilter (pf & pflog) built in the kernel, usefull module if you want to setup firewalling, redirection rules or QoS.

We'll have to download the kernel source code, change our default configuration by adding the good options and rebuild our kernel.

Downloading the kernel source code :

You should probably use the new FreeBSD 11.0 release.

# pkg install subversion 
# cd /usr/src && svn co svn://svn.freebsd.org/base/releng/11.0/ /usr/src

Change your configuration :

# vi /usr/src/sys/arm/conf/RPI2

You just have to add the following lines :

device pf 
device pflog

Rebuild the kernel :

# cd /usr/src 
# make buildkernel KERNCONF=RPI2 
# make installkernel KERNCONF=RPI2

Reboot your system :

# shutdown -r now

Configure PacketFilter :

# vi /etc/rc.conf 


The rules need to be put in the file : /etc/pf.conf

Starting PacketFilter :

# service pf start 
# service pflog start

Need help ?



« I know everyone I've been everywhere I know everything Because I'm everybody » Ether - Nothingface

Read More