netfilter-persistent(8)
π netfilter-persistent(8) π
okay bestie, gather round, because we're about to talk about netfilter-persistent β it lives in section 8 of the System Manager's Manual, so you already know it's giving system-administration main character energy. π
β¨ NAME β¨
netfilter-persistent β load, flush and save netfilter rule sets
like. it does three things and it does them well. load, flush, save. the holy trinity. π
πΈ SYNOPSIS πΈ
netfilter-persistent start
netfilter-persistent stop
netfilter-persistent flush
netfilter-persistent save
four whole moods. pick your fighter. π
π¦ DESCRIPTION π¦
so here's the vibe: netfilter-persistent uses a whole lil squad of plugins to load, flush and save netfilter rules at boot and halt time. yes bestie, it's the thing that makes your firewall rules survive a reboot, no cap. π₯
and the plugins? they can be written in any suitable language you want β go off, honestly β and they live in /usr/share/netfilter-persistent/plugins.d. that's their house. respect it. π
π OPTIONS π
startβ calls all plugins with thestartargument, which makes them load their rules into netfilter. the glow-up moment. β¨stopβ if the configurationFLUSH_ON_STOPis enabled, it calls all plugins with theflushargument, causing them to remove their rules from netfilter. otherwise? it just emits a warning. only. that's it. a lil warning. πflushβ calls all plugins with theflushargument, causing them to remove their rules from netfilter. bye bye rules, it was fun. πsaveβ calls all plugins with thesaveargument, causing them to save the currently-loaded rules to persistent storage. so that they persist. hence the name. iykyk. πΎ
π§ PLUGINS π§
plugins can be written in any language and are merely executed by netfilter-persistent with a single argument. that's the whole contract, bestie. one arg. that's it. all plugins are stored in /usr/share/netfilter-persistent/plugins.d β that's the plugin directory, keep up. π«Ά
- Plugins must implement the
startflushandsavearguments and must not rely on additional arguments for other functionality. - Plugins must return
0on success and any other code on failure. (zero means slay, anything else means uh oh.)
plugins are also free to use and extend the configuration in /etc/default/netfilter-persistent, and to implement their own configuration files. build your own little empire, we love to see it. π
β FILES β
/etc/default/netfilter-persistentβ Main configuration file/usr/share/netfilter-persistent/plugins.dβ Plugin directory
π COPYRIGHT π
Copyright (C) 2009 Simon Richter <sjr@debian.org> Copyright (C) 2010, 2014 Jonathan Wiltshire <jmw@debian.org>
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
like. legally iconic. πβ¨
π AUTHORS π
Jonathan Wiltshire <jmw@debian.org>
and that's the whole page bestie, from the System Manager's Manual down to the very last line, which is literally just netfilter-persistent(8) β no version, no date, just the title sitting there looking cute. periodt. πππ¦
π¦ where this page comes from
- debian bookworm: netfilter-persistent 1.0.20 Β· GPL-3.0-only
- debian trixie: netfilter-persistent 1.0.23 Β· GPL-3.0-only
- ubuntu jammy: netfilter-persistent 1.0.16 Β· GPL-3.0-only
- ubuntu noble: netfilter-persistent 1.0.20 Β· GPL-3.0-only
- ubuntu questing: netfilter-persistent 1.0.23
- ubuntu resolute: netfilter-persistent 1.0.24 Β· GPL-3.0-only
- ubuntu stonking: netfilter-persistent 1.0.24 Β· GPL-3.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms