FILTERGEN(8)
πΈ FILTERGEN(8) β packet filter compiler πΈ
okay bestie, welcome to the System Manager's Manual section for filtergen, the little compiler that could π she eats your high-level filter language and spits out firewall rules. no cap.
β¨ NAME β¨
filtergen β packet filter compiler π§
β¨ SYNOPSIS β¨
filtergen [ -h | --help ] [ -V | --version ] [ -c | --compile ] [ -t target | --target=target ] [ -o outfile | --output=outfile ] infile
filtergen [ -h | --help ] [ -V | --version ] [ -c | --compile ] [ -t target | --target=target ] [ -o outfile | --output=outfile ] [ -F policy | --flush=policy ]
β¨ DESCRIPTION β¨
filtergen compiles a high-level filtering description language into a variety of target formats. that's it. that's the vibe. π¦
β¨ USAGE β¨
filtergen reads the ruleset from the infile you give it on the command line (or from standard input if infile is -), and it outputs to standard output (or to outfile) via a backend that you can optionally pick. π
both short options and GNU-style long options are accepted, so pick whichever one your heart says:
-c,--compileβ only try to "compile" the input, and don't generate any output at all. this is lowkey the move when you wanna check that an input file has no syntax errors in it before you attempt to use the result on a live server. safety first bestie π«Ά-ttarget-filter,--target=target-filterβ if you specify it,target-filtergets used to select an output filter type. otherwise the default ofiptablesis used. the supported backends areiptables,ip6tables,iptables-restore,ip6tables-restore,ipchains,ipfilterandcisco(for Cisco IOS access-lists). pick your fighter π-Fpolicy,--flush=policyβ flush mode. generate a set of rules for clearing all rules from the packet filter. super useful for firewall scripts that need toshutdownthe firewall. you can supply a policy argument in place of the usual filename, to specify whether the flushed filter should default to accept, reject, or drop. it defaults toaccept, which is equivalent to having no filter loaded at all. and ngl, it is not necessary to specify aninfilewhen using flush mode. periodt β¨-ooutfile,--output=outfileβ write output tooutfileinstead of standard output. redirecting but make it official π-h,--helpβ show command help. bestie needs a lil help sometimes π₯Ί-V,--versionβ show program version. the iconique origin story check π
β¨ BUGS β¨
- not all backends implement all features. π it's giving "we're all doing our best".
- the packet filter is not optimised. π no further comment.
β¨ SEE ALSO β¨
fgadm(8), filter_syntax(5), filter_backends(7)
β¨ AUTHOR β¨
filtergen was originally written by Matthew Kirkwood. then Jamie Wilkinson <jaq@spacepants.org> rewrote a lot of the internals, added some features, and took on maintenance of the project. main character energy fr fr π
and that's the whole page bestie π dated January 7, 2004, from the System Manager's Manual β stay slaying those packets β¨π
π¦ where this page comes from
- debian bookworm: filtergen 0.12.8-1+b1
- debian trixie: filtergen 0.12.8-3
- ubuntu jammy: filtergen 0.12.8-1
- ubuntu noble: filtergen 0.12.8-3
- ubuntu questing: filtergen 0.12.8-3
- ubuntu resolute: filtergen 0.12.8-3build1
- ubuntu stonking: filtergen 0.12.8-3build1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms