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 the start argument, which makes them load their rules into netfilter. the glow-up moment. ✨
  • stop β€” if the configuration FLUSH_ON_STOP is enabled, it calls all plugins with the flush argument, 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 the flush argument, causing them to remove their rules from netfilter. bye bye rules, it was fun. πŸ’€
  • save β€” calls all plugins with the save argument, 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 start flush and save arguments and must not rely on additional arguments for other functionality.
  • Plugins must return 0 on 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 (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. πŸ’–πŸŽ€πŸ¦‹