Script to parse active iptables rules
Fri, 22 Sep 2000 09:00:46 +0200
On Thu, Sep 21, 2000 at 09:12:12PM +0000, Stephen A. Zarkos wrote:
> I'm not sure if anyone has done this for iptables already.. But anyway,
> here's a little perl script I wrote that can take the output from an
> iptables list command, parse it, and write it to a file to recreate the
> shell script. Unfortunately, my schedule has gotten quite busy, and
> some of iptables' options aren't implemented yet. So if there are any
> perl hackers out there, it's pretty simple to add the missing
> functionality. I'll get to it eventually tho.
mmmh... iptables is already prepared to do this in a more convenient way.
Have a look at the netfilter package and look for iptables-save.c and
Live long and prosper
- Harald Welte / email@example.com http://www.gnumonks.org
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M-
V-- PS+ PE-- Y+ PGP++ t++ 5-- !X !R tv-- b+++ DI? !D G+ e* h+ r% y+(*)