NG_IPFW(4)
π NG_IPFW(4) π
okay so bestie, this is the NG_IPFW(4) page from the Kernel Interfaces Manual, and it's literally the whole vibe of how netgraph and the IP firewall talk to each other. no cap, it's giving βtiny bridge, huge responsibilityβ energy π«Ά
β¨ NAME β¨
ng_ipfw β interface between netgraph and IP firewall
π SYNOPSIS π
#include <netinet/ip_var.h>
#include <netgraph/ng_ipfw.h>
πΈ DESCRIPTION πΈ
The ipfw node implements the interface between the ipfw(4) and netgraph(4) subsystems. that's the whole assignment, and it ate π
π¦ HOOKS π¦
The ipfw node supports an arbitrary number of hooks, and those hook names must be made using only numeric characters. like, digits only, bestie β no letters, no cute little underscores, just numbers π’
β OPERATION β
Once the ng_ipfw module is loaded into the kernel, a single node named ipfw is automatically created. no more ipfw nodes can be created. periodt. and once it's destroyed, the only way to recreate the node is to reload the ng_ipfw module. so yeah, icon behavior, but also slightly main-character fragile π
Packets can be injected into netgraph(4) using either the netgraph or ngtee commands of the ipfw(8) utility. these commands require a numeric cookie to be supplied as an argument. packets are sent out of the hook whose name equals the cookie value. if no hook matches, packets are discarded. gone. not seen. π
Packets injected via the netgraph command are tagged with struct ipfw_rule_ref. this tag contains information that helps the packet re-enter ipfw(4) processing, should the packet come back from netgraph(4) to ipfw(4). it's like a little βhey remember me?β note attached to the packet π₯Ί
Packets received by a node from the netgraph(4) subsystem must be tagged with the struct ipfw_rule_ref tag. packets re-enter IP firewall processing at the next rule. if no tag is supplied, packets are discarded. no tag, no entry, bestie β that's the rule π«
π CONTROL MESSAGES π
This node type supports only the generic control messages. that's it. no extra special messages, no secret menu π
π₯ SHUTDOWN π₯
This node shuts down upon receipt of a NGM_SHUTDOWN control message.
bestie, do not do this. the newipfwnode can only be created by reloading theng_ipfwmodule, so shutting it down is a whole commitment. dramatic, but true π
π SEE ALSO π
π HISTORY π
The ipfw node type was implemented in FreeBSD 6.0. vintage, but make it slay β¨
π AUTHORS π
The ipfw node was written by Gleb Smirnoff <glebius@FreeBSD.org>. we love a credited icon π«Ά
and that's the whole page, bestie β sourced from Debian, dated March 2, 2010. mwah π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- nixpkgs unstable: source
- Copyright (c) 2005 Gleb Smirnoff
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms