Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to be able to include some parts of my pf.conf from other set of files.

For example I will include "set timeout" vs like statements in another file.

Using anchors and "load anchor from file" statements will not help because anchor can not hold such GLOBAL OPTIONS.

share|improve this question
May be you should write your own config generator? – SaveTheRbtz May 14 '11 at 0:02
up vote 2 down vote accepted

One way to do this is to use m4 as a preprocessor that produces your final pf.conf. Or you can even break your pf.conf into parts and then have a simplistic "preprocessor" cat those parts > /etc/pf.conf.

share|improve this answer

As per the pf.conf man page:

"Comments can be put anywhere in the file using a hash mark (`#'), and extend to the end of the current line. Additional configuration files can be included with the include keyword, for example:

       include "/etc/pf/sub.filter.conf""
share|improve this answer
I could be mistaken, but the FreeBSD manual page for pf.conf does not seem to cover the include keyword. – adamo Jul 11 '11 at 9:36
Yup. I think you have to add an anchor at the appropriate place, and then call load anchor anchor_name from "/etc/pf/sub.filter.conf" – Pitarou Mar 12 '14 at 4:09

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.