PF (firewall)
Original author(s) | Daniel Hartmeier |
---|---|
Developer(s) | The OpenBSD Project |
Initial release | 1 December 2001 (2001-12-01) |
Repository |
|
Written in | C |
Operating system | OpenBSD |
Type | Packet filtering |
License | BSD license |
Website | www.openbsd.org/faq/pf/index.html |
PF (Packet Filter, also written pf) is a BSD licensed stateful packet filter, a central piece of software for firewalling. It is comparable to netfilter (iptables), ipfw, and ipfilter.
PF was developed for OpenBSD, but has been ported to many other operating systems.
Contents
1 History
2 Features
3 Ports
4 See also
5 References
6 Books
7 External links
History
PF was originally designed as replacement for Darren Reed's IPFilter, from which it derives much of its rule syntax. IPFilter was removed from OpenBSD's CVS tree on 30 May 2001 due to OpenBSD developers' concerns with its license.[1]
The initial version of PF was written by Daniel Hartmeier.[2] It appeared in OpenBSD 3.0, which was released on 1 December 2001.[3]
It was later extensively redesigned by Henning Brauer and Ryan McBride[4] with most of the code written by Henning Brauer. Henning Brauer is currently the main developer of PF.
Features
The filtering syntax is similar to IPFilter, with some modifications to make it clearer. Network Address Translation (NAT) and Quality of Service (QoS) have been integrated into PF, QoS by importing the ALTQ queuing software and linking it with PF's configuration. Features such as pfsync and CARP for failover and redundancy, authpf for session authentication, and ftp-proxy to ease firewalling the difficult FTP protocol, have also extended PF.
Also PF supports SMP (Symmetric multiprocessing) & STO (Stateful Tracking Options).
One of the many innovative features is PF's logging. PF's logging is configurable per rule within the pf.conf and logs are provided from PF by a pseudo-network interface called pflog, which is the only way to lift data from kernel-level mode for user-level programs. Logs may be monitored using standard utilities such as tcpdump, which in OpenBSD has been extended especially for the purpose, or saved to disk in the tcpdump/pcap binary format using the pflogd daemon.
Ports
Apart from running on its home platform OpenBSD, PF has been ported to many other operating systems, however there are major differences in capabilities. Some ports date back many years. OpenBSD always has the latest version with the most features.
PF is currently used in:
FreeBSD starting with version 5.3[5]
- Apple Mac OS X starting with Snow Leopard (OS X 10.6)[6]
- Apple iOS the operating system used by all iPhones and iPads
NetBSD from version 3.0[7]
DragonFly BSD from version 1.1[8]- Debian GNU/kFreeBSD
Oracle Solaris[9]
QNX and thereby in many BlackBerry smartphones models
pfSense free open source FreeBSD based firewall/router
OPNSense free open source FreeBSD based firewall/router
See also
- Internet protocol suite
- Reverse path forwarding
References
^ de Raadt, Theo (2001-05-30). "CVS: cvs.openbsd.org: src; Remove ipf". Retrieved 2018-08-20..mw-parser-output cite.citationfont-style:inherit.mw-parser-output .citation qquotes:"""""""'""'".mw-parser-output .citation .cs1-lock-free abackground:url("//upload.wikimedia.org/wikipedia/commons/thumb/6/65/Lock-green.svg/9px-Lock-green.svg.png")no-repeat;background-position:right .1em center.mw-parser-output .citation .cs1-lock-limited a,.mw-parser-output .citation .cs1-lock-registration abackground:url("//upload.wikimedia.org/wikipedia/commons/thumb/d/d6/Lock-gray-alt-2.svg/9px-Lock-gray-alt-2.svg.png")no-repeat;background-position:right .1em center.mw-parser-output .citation .cs1-lock-subscription abackground:url("//upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Lock-red-alt-2.svg/9px-Lock-red-alt-2.svg.png")no-repeat;background-position:right .1em center.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registrationcolor:#555.mw-parser-output .cs1-subscription span,.mw-parser-output .cs1-registration spanborder-bottom:1px dotted;cursor:help.mw-parser-output .cs1-ws-icon abackground:url("//upload.wikimedia.org/wikipedia/commons/thumb/4/4c/Wikisource-logo.svg/12px-Wikisource-logo.svg.png")no-repeat;background-position:right .1em center.mw-parser-output code.cs1-codecolor:inherit;background:inherit;border:inherit;padding:inherit.mw-parser-output .cs1-hidden-errordisplay:none;font-size:100%.mw-parser-output .cs1-visible-errorfont-size:100%.mw-parser-output .cs1-maintdisplay:none;color:#33aa33;margin-left:0.3em.mw-parser-output .cs1-subscription,.mw-parser-output .cs1-registration,.mw-parser-output .cs1-formatfont-size:95%.mw-parser-output .cs1-kern-left,.mw-parser-output .cs1-kern-wl-leftpadding-left:0.2em.mw-parser-output .cs1-kern-right,.mw-parser-output .cs1-kern-wl-rightpadding-right:0.2em
^ Hartmeier, Daniel (2017-09-26). "A new stateful packet filter for OpenBSD". Retrieved 2018-08-20.
^ "OpenBSD 3.0". 2001-12-01. Retrieved 2018-08-20.
^ Brauer, Henning. "Henning Brauer Consulting: pf". Retrieved 2018-08-20.
^ "FreeBSD/amd64 5.3-RELEASE Release Notes". 2004-11-03. Retrieved 2018-08-20.
^ "xnu/xnu-1456.1.26/bsd/net/pf.c.auto.html". Apple, Inc. 2008-12-05. Retrieved 2018-08-20.
^ "Changes and NetBSD News in 2005: 23 Dec 2005 - NetBSD 3.0 released". Retrieved 2018-08-20.
^ "pf(4) manual page". DragonFly Kernel Interfaces Manual. 2011-01-02. Retrieved 2018-08-20.
^ "Introduction to Packet Filter". Securing the Network in Oracle® Solaris 11.3. Oracle Corporation. March 2018. Retrieved 2018-08-20.
Books
Hansteen, Peter N.M. (October 2014). Book of PF: A No-Nonsense Guide to the OpenBSD Firewall (3 ed.). No Starch Press. p. 248. ISBN 978-1-59327-589-1.
Jeremy C. Reed, ed. (August 2006). The OpenBSD PF Packet Filter Book: PF for NetBSD, FreeBSD, DragonFly, and OpenBSD. Reed Media Services. ISBN 978-0-9790342-0-6.
Artymiak, Jacek (2003). Building Firewalls with OpenBSD and pf. Selbstverlag. ISBN 978-8391665114.
External links
The Wikibook Guide to Unix has a page on the topic of: OpenBSD PF |
– OpenBSD Kernel Interfaces Manual
– OpenBSD System Manager's Manual- The OpenBSD PF guide
Firewalling with PF: PF tutorial by Peter N. M. Hansteen- OpenBSD/pf Firewalling For the Less Gifted