Freebsd – using “include” like statement in pf.conf to include some parts from other files

freebsdpfpfsense

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.

Best Answer

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.