Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: iptables: User

Re: File with chain names?

 

 

iptables user RSS feed   Index | Next | Previous | View Threaded


kakadu at earthlink

Jul 24, 2001, 4:29 PM

Post #1 of 2 (525 views)
Permalink
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
>
>
>
>


kevin at thewalledcity

Jul 24, 2001, 5:47 PM

Post #2 of 2 (487 views)
Permalink
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 [at] thewalledcity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
www.thewalledcity.net - Free webmail
irc.irctoo.net - the IRCtoo chat net

-----Original Message-----
From: netfilter-admin [at] lists
[mailto:netfilter-admin [at] lists] On Behalf Of Brad Chapman
Sent: Wednesday, July 25, 2001 12:30 AM
To: Toby Chamberlain
Cc: netfilter [at] lists
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
>
>
>
>

iptables user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.