summaryrefslogtreecommitdiff
path: root/data/templates/ipt-netflow/ipt_NETFLOW.conf.j2
AgeCommit message (Collapse)Author
2026-07-30flow-accounting: T9122: bind NetFlow export to the configured VRFLee Clements
After the migration from pmacct to the ipt_NETFLOW kernel module the "system flow-accounting vrf" node no longer had any effect on the export path. NetFlow is emitted by the kernel module, so there is no daemon left to wrap in "ip vrf exec" and the module socket was never bound to the VRF. A collector reachable only inside a VRF therefore never received any flows when the export was configured with a source-address. Bind the export socket to a device via the ipt_NETFLOW "%device" destination suffix: a per-server source-interface takes precedence, otherwise the global VRF device is used, reproducing the previous "ip vrf exec" behaviour. The module parses "@source-address" before "%device", so the source-address is now rendered first - the previous template emitted them in the opposite order, which only worked because the two options are mutually exclusive per server. Reject a source-interface that is used together with a VRF but is not a member of that VRF: the exported flows would otherwise silently leave via a different routing table. This mirrors the existing OSPF, OSPFv3, IS-IS and BGP checks.
2025-09-16T75: migrate from pmacct to ipt_NETFLOWKyrylo Yatsenko
* Change nft to iptables in system_flow-accounting.py as ipt_NETFLOW is iptales plugin * Remove specific and non-relevant pmacct options * Add ipt_NETFLOW options * Move 'interfaces' to 'netflow' tree * Support more flexible 'source-address' and 'source-interface' for each server instead of one source * Add migration script * Update op mode command 'show flow-accounting' * Update op mode command 'restart flow-accounting'