FGADM(8)

πŸ‘‘ FGADM β€” bestie edition πŸ’…

ok so this is the man page for fgadm, which lives in section 8 of the System Manager's Manual. it's the filtergen command program β€” the little command interface that runs your filtergen-based packet filters. yes, packet filters. yes, firewalls. yes, she's that girl. ✨


✨ NAME ✨

fgadm β€” the filtergen command program πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

fgadm [ check | reload | save | stop ]

πŸ’– DESCRIPTION πŸ’–

fgadm is a simple command interface for managing filtergen(8) based packet filters. that's it. that's the whole vibe. she's not complicated, she's just effective. 🫢


🌸 USAGE 🌸

so here's the tea, bestie: fgadm can do four things.

  • stop existing filters β€” like, actually turning them off πŸ”Œ
  • reload new packet filters
  • save currently running filters so they stick around for longevity πŸ’Ύ
  • check filter scripts for errors before you reload, because we do not do chaos here 🧚

the following commands are accepted by fgadm:

  • check β€” checks the filter script /etc/filtergen/rules.filter for errors. the generated filter gets printed to standard output, and any errors get printed to standard error. lowkey the most useful one ngl. πŸ”
  • reload β€” replaces the current live packet filter with the one in /etc/filtergen/rules.filter. and yes, the script gets tested for errors before reloading, so you don't nuke yourself. iconic behaviour fr fr. πŸ”₯
  • save β€” the current live packet filter gets saved in a distribution-friendly way. on Red Hat systems, this saves the iptables or ipchains firewall that is currently loaded into the kernel, so it loads at boot with the iptables or ipchains initscript. πŸ’Ύβœ¨
  • stop β€” flushes the current live packet filter out and puts it in a default accept mode, which means no firewalling will be in place. that's the whole point though β€” it's useful to abort firewalls in an emergency. emergency stop button energy. 🚨

🌈 EXAMPLES 🌈

here's a sequence of commands you might find useful for making firewall changes on live servers. like, genuinely. this is the move. πŸ‘‘

# at now + 2 min
warning: commands will be executed using (in order) a) $SHELL b) login
shell c) /bin/sh
at> fgadm stop
at> ^D<EOT>
job 53 at 2004-06-07 17:25
# fgadm check
# fgadm reload
# atq
53
# atrm 53
# fgadm save

the way this schedules a stop two minutes out as a safety net, then checks, then reloads, then cancels the safety net, then saves?? main character firewall maintenance. no cap. πŸŽ€


πŸŽ€ FILES πŸŽ€

/etc/filtergen/rules.filter

packet filter descriptions are read from this file when fgadm is used. this is the file. πŸ’–

/etc/filtergen/fgadm.conf

this file alters the behaviour of filtergen as called from fgadm. ✨


πŸ’€ BUGS πŸ’€

fgadm save does not work on Debian systems with iptables due to a lack of common sense in the iptables package. 😭 not me being shady in a man page but okay, it's literally in the docs.

πŸ¦‹ SEE ALSO πŸ¦‹


πŸ’œ AUTHOR πŸ’œ

fgadm was written by Jamie Wilkinson <jaq@spacepants.org> for the filtergen package, to ease maintenance of filtergen-based firewalls. king behaviour honestly. πŸ‘‘


and that's the whole page, bestie!! this one came out of the System Manager's Manual, dated June 7, 2004 β€” vintage but still serving looks. go forth and manage your packet filters responsibly πŸ’…βœ¨