Mailing List Archive

Re: File with chain names?
Mr. Chamberlain,

AFAIK, no. You'll probably have to use a series of commands like
`sed', `cut', and `grep',
or, if you're programming, using libiptc to get a table snapshot after
parsing /proc/net/ip_tablenames.

Brad

Toby Chamberlain wrote:

> Is there a file (like ip_fwnames in ipchains) that lists the existing
> chain names in iptables? I looked through /proc/net but there only
> seems to be ip_tablenames which lists the tables, but not the chains.
>
> Thanks
> Toby
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
>
>
>
>
RE: File with chain names? [ In reply to ]
bash:

for table in `cat /proc/net/ip_tables_names`; do iptables -t $table -L |
grep Chain | cut --fields=2 --delimiter=\ ; done

Kev

Kevin Evans - kevin@thewalledcity.net
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
www.thewalledcity.net - Free webmail
irc.irctoo.net - the IRCtoo chat net

-----Original Message-----
From: netfilter-admin@lists.samba.org
[mailto:netfilter-admin@lists.samba.org] On Behalf Of Brad Chapman
Sent: Wednesday, July 25, 2001 12:30 AM
To: Toby Chamberlain
Cc: netfilter@lists.samba.org
Subject: Re: File with chain names?


Mr. Chamberlain,

AFAIK, no. You'll probably have to use a series of commands like
`sed', `cut', and `grep',
or, if you're programming, using libiptc to get a table snapshot after
parsing /proc/net/ip_tablenames.

Brad

Toby Chamberlain wrote:

> Is there a file (like ip_fwnames in ipchains) that lists the existing
> chain names in iptables? I looked through /proc/net but there only
> seems to be ip_tablenames which lists the tables, but not the chains.
>
> Thanks
> Toby
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at
> http://explorer.msn.com/intl.asp
>
>
>
>