Pf Pf

Pf - Definition and Overview

The title given to this article is incorrect due to technical limitations. The correct title is pf.

pf is OpenBSD's stateful packet filter, written by Daniel Hartmeier. It replaced Darren Reed's IPFilter in OpenBSD, due to problems with its license. pf has evolved quickly, and has now several advantages over others. The filtering syntax is similar to ipf, though it has been modified to make it more clean. Network Address Translation (NAT) and Quality of Service (QoS) have been tightly integrated into pf, to allow greater flexibility. QoS is achieved by merging ALTQ into pf itself.

pf has also been ported to NetBSD-current by itojun and is installed by default in FreeBSD starting at version 5.3.

Contents

Commands and options

  • pfctl -e -> enables pf
  • pfctl -d -> disables pf
  • pfctl -f <file> -> if no syntax errors are found on target file, new rules will be loaded into pf

Example PF.conf file

#Macros
ext_if="xl1"
int_if="xl0"
int_network="192.168.0.0/24"
ext_network="XXX.XXX.XXX.0"
ext_ip="XXX.XXX.XXX.XXX"
loop_back="lo0"

#NAT

nat on $ext_if from $int_network to any -> $ext_ip

#PF-rules

block in all
pass out all keep state
pass in quick on $int_if from $int_network to any keep state
pass quick on $loop_back all

See also

External links

Example Usage of Pf

corneezy: Pf Changs can suck my Pf DICK!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
tetii: @gustavoportom claro q eu entendo, né, Pf :D
carissarock1: Xmas is 8 DAYS!!! Tomorrow is the last day Pf school till xmas breakk!
Copyright 2009 WordIQ.com - Privacy Policy  :: Terms of Use  :: Contact Us  :: About Us
This article is licensed under the GNU Free Documentation License. It uses material from the this Wikipedia article.