Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 10 Jun 2021 20:03:52 +0000
From:      bugzilla-noreply@freebsd.org
To:        pf@FreeBSD.org
Subject:   [Bug 256410] pf: Add pf_default_rules option
Message-ID:  <bug-256410-16861-petSzt2WbY@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-256410-16861@https.bugs.freebsd.org/bugzilla/>
References:  <bug-256410-16861@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D256410

--- Comment #10 from Thomas Steen Rasmussen / Tykling <thomas@gibfest.dk> -=
--
Alright, I've attached an updated version of the patch which checks for the
existence of $pf_default_rules_file (which defaults to /etc/pf-default.conf=
 in
/etc/defaults/rc.conf) and if the file exists it loads it, and if not it lo=
ads
the rules in $pf_default_rules.

Example:

[tykling@nuc2 ~]$ sudo service pf restart
Enabling pfno IP address found for foo
/etc/pf-typo.conf:2: could not parse host specification
pfctl: Syntax error in config file: pf rules not loaded
/etc/rc.d/pf: WARNING: Unable to load /etc/pf-typo.conf and
pf_default_rules_enable is set to YES.
/etc/rc.d/pf: WARNING: pf_default_rules_file /etc/pf-default.conf not found,
looading pf_default_rules: block drop log all
.
[tykling@nuc2 ~]$

After setting pf_default_rules_file to an existing file:

[tykling@nuc2 ~]$ sudo sysrc pf_default_rules_file=3D"/etc/pf.conf"=20=20=
=20=20=20=20=20=20=20=20=20=20=20=20=20
pf_default_rules_file: /etc/pf-default.conf -> /etc/pf.conf
[tykling@nuc2 ~]$ sudo service pf restart
Enabling pfno IP address found for foo
/etc/pf-typo.conf:2: could not parse host specification
pfctl: Syntax error in config file: pf rules not loaded
/etc/rc.d/pf: WARNING: Unable to load /etc/pf-typo.conf and
pf_default_rules_enable is set to YES.
/etc/rc.d/pf: WARNING: Loading pf_default_rules_file: /etc/pf.conf
.
[tykling@nuc2 ~]$

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-256410-16861-petSzt2WbY>