MAC_IFOFF(4)
π MAC_IFOFF(4) β the interface silencing policy, bestie edition π
okay so real talk, the manual name is MAC_IFOFF and it lives in section 4 (that's the Kernel Interfaces Manual, for the girlies keeping track) and it's literally called the interface silencing policy. yes. silencing. like when you mute the group chat but for network interfaces. iconic behavior honestly. π
β¨ SYNOPSIS β¨
so you wanna get this policy up in your kernel? you got two routes, bestie, and both of them start with a kernel configuration file. pick your fighter:
Route 1 β compile it straight into your kernel. drop these lines into your kernel config file:
options MAC
options MAC_IFOFF
Route 2 β load it as a module at boot time. this one's a two-parter, don't skip a step or it's giving β¨brokenβ¨. first, in your kernel config file:
options MAC
and then in loader.conf(5):
mac_ifoff_load="YES"
slay. that's the whole vibe. π
πΈ DESCRIPTION πΈ
the mac_ifoff interface silencing module lets administrators (that's you, main character) turn incoming and outgoing data flow on and off on system network interfaces, all through the sysctl(8) interface. no cap. you're basically the bouncer at the club door of your own network stack. π«Ά
to disable network traffic over the loopback (lo(4)) interface, set the sysctl(8) OID security.mac.ifoff.lo_enabled to 0 β and heads up, the default here is 1. so it's on unless you say otherwise. π
to enable network traffic over other interfaces, set the sysctl(8) OID security.mac.ifoff.other_enabled to 1 β default is 0, meaning those other interfaces are NOT passing traffic until you personally give them permission. gatekeeping, but make it kernel-level. π
to allow BPF traffic to be received even while all the other traffic is disabled, set the sysctl(8) OID security.mac.ifoff.bpfrecv_enabled to 1 β default is 0. it's the exception clause, the "you specifically can come in" of it all. π
π¦ Label Format π¦
No labels are defined.
that's it. that's the whole section. nothing. zero. empty. and honestly? the confidence of it. π
π SEE ALSO π
the whole friend group, fr fr:
mac(4)mac_bsdextended(4)mac_lomac(4)mac_mls(4)mac_none(4)mac_partition(4)mac_portacl(4)mac_seeotheruids(4)mac_test(4)mac(9)
π HISTORY π
the mac_ifoff policy module first appeared in FreeBSD 5.0, and it was developed by the TrustedBSD Project. so it's not new, it's a legacy icon. respect the elders. π§
π AUTHORS π
this software was contributed to the FreeBSD Project by Network Associates Labs, the Security Research Division of Network Associates Inc., under DARPA/SPAWAR contract N66001-01-C-8035 (βCBOSSβ), as part of the DARPA CHATS research program. government-funded research said "we're building this and it's gonna be great" and they were right. β
π BUGS π
okay bestie, this part is important, so read it carefully and don't skim:
while the MAC Framework design is intended to support the containment of the root user, not all attack channels are currently protected by entry point checks. as such, MAC Framework policies should not be relied on, in isolation, to protect against a malicious privileged user.
π¨ translation: the design wants to contain root, but it can't catch everything yet. don't build your whole security story on one policy by itself. that's not a vibe, that's a vulnerability. π¨
and that's the page, bestie. this one came from Debian, dated July 25, 2015 β so if it's aging like fine wine, that's because it is. π
later, love u, go set your sysctls responsibly. πβ¨π¦ππ
π¦ where this page comes from
- debian bookworm: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- debian trixie: freebsd-manpages 12.2-2 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu jammy: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu noble: freebsd-manpages 12.2-1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu questing: freebsd-manpages 12.2-2
- ubuntu resolute: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- ubuntu stonking: freebsd-manpages 12.2-2build1 Β· BSD-2-Clause-FreeBSD AND BSD-4-Clause
- Copyright (c) 2002 Networks Associates Technology, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms