使用pf.conf中的“include”语句来包含来自其他文件的某些部分

我希望能够从其他文件集包括我的pf.conf的一些部分。

例如,我将包括“设置超时”与另一个文件中的类似的语句。

使用锚点和“从文件加载锚点”语句将无济于事,因为锚点不能容纳这样的全局选项。

一种方法是使用m4作为预处理器,生成最终的pf.conf。 或者你甚至可以把你的pf.conf分解成多个部分,然后使用一个简单的“预处理器”cat部分> /etc/pf.conf。

根据pf.conf手册页:

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" 

资料来源: https : //www.freebsd.org/cgi/man.cgi?query=pf.conf&apropos=0&sektion=0&manpath=FreeBSD+9.0-RELEASE