FreeBSD Enable PF ALTQ Firewall Support

w‮‬ww.lautturi.com
FreeBSD Enable PF ALTQ Firewall Support

To enable PF ALTQ (Adaptive Link-Time Queuing) support on a FreeBSD system, you will need to do the following:

  1. Load the PF kernel module by adding the following line to the /boot/loader.conf file:
pf_load="YES"
  1. Load the ALTQ kernel module by adding the following line to the /boot/loader.conf file:
altq_load="YES"
  1. Enable PF by adding the following line to the /etc/rc.conf file:
pf_enable="YES"
  1. Create a PF configuration file. This file should specify the rules and settings for your firewall. You can use the pfctl utility to generate a sample configuration file:
# pfctl -v -d > /etc/pf.conf

This will create a file named /etc/pf.conf with default rules and settings. You can then edit this file to customize the firewall configuration for your needs.

  1. Enable ALTQ in the PF configuration file by adding the following line:
altq on $ext_if cbq bandwidth 100Mb queue { std, ssh, http }

Replace $ext_if with the name of the external interface, and 100Mb with the bandwidth of the interface.

  1. Start PF by running the following command:
# service pf start

This will enable the PF firewall and enable ALTQ support.

For more information about configuring and using the PF firewall on a FreeBSD system, you can refer to the PF documentation and the pfctl man page by running man pfctl on the command line.

Created Time:2017-10-28 20:40:34  Author:lautturi