Page MenuHomeFreeBSD

ipfilter: Restrict ipfilter within a jail
ClosedPublic

Authored by cy on Nov 6 2025, 7:24 PM.
Tags
None
Referenced Files
F150116397: D53623.id.diff
Sun, Mar 29, 12:41 PM
Unknown Object (File)
Wed, Mar 25, 11:10 AM
Unknown Object (File)
Tue, Mar 3, 8:31 AM
Unknown Object (File)
Tue, Mar 3, 8:31 AM
Unknown Object (File)
Tue, Mar 3, 8:31 AM
Unknown Object (File)
Sun, Mar 1, 9:04 PM
Unknown Object (File)
Sun, Mar 1, 6:56 AM
Unknown Object (File)
Jan 18 2026, 4:12 PM

Details

Summary

Add a sysctl/tunable (net.inet.ipf.jail_allowed) to control whether a
jail can manage its own ipfilter rules, pools, and settings. A jail's
control over its own ipfilter rules and settings may not be desireable.
The default is jail access to ipfilter is denied.

The host system can stil manage a jail's rules by attaching the rules,
using the on keyword, limiting the rule to the jail's interface. Or
the sysctl/tunable can be enabled to allow a jail control over its own
ipfilter rules and settings.

Implementation note: Rather than store the jail_allowed variable,
referenced by sysctl(9), in a global area, storing the variable in the
ipfilter softc is consistent with ipfilter's use of its softc.

Discussed with: emaste, jrm
MFC after: 1 week

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 68464
Build 65347: arc lint + arc unit