On Thu, 2 May 2002, Glover George wrote: > Is there anyway to do this. I would like from a userspace program to > ask netfilter two different things. > > 1). What is the policy on a give chain. I want to ask netfilter is > their Forward policy DROP or ACCEPT or whatever. Can I do this from > userspace, and how.
iptables -L -n -x -v | grep '^Chain INPUT' | sed -e 's/.*policy //' -e 's/ .*//' repeat for the FORWARD and OUTPUT. Cheers, - Bill --------------------------------------------------------------------------- First snow, then silence. This thousand dollar screen dies so beautifully. -- Error messages in haiku (Courtesy of Rasmus Andersen <[EMAIL PROTECTED]>) -------------------------------------------------------------------------- William Stearns ([EMAIL PROTECTED]). Mason, Buildkernel, named2hosts, and ipfwadm2ipchains are at: http://www.stearns.org --------------------------------------------------------------------------