IPChains

Description Reads the byte counter on the last rule in a chain on a Unix box using ipchains as a firewall. Unfortunately this test needs to read info in the /proc/net/ip_fwchains file.

If the following rules were entered on a Linux box with ipchains setup then the script could be used to read values for the data to and from 192.168.100.19. The idea is simple, direct output that you want to measure to a custom chain and add an accept rule to the chain.

#ipchains -N testin
#ipchains -N testout

#ipchains -A output -d 192.168.100.19 -j testout
#ipchains -A input -s 192.168.100.19 -j testin

#ipchains -A testin -j ACCEPT
#ipchains -A testout -j ACCEPT
Enter 'testin' as in Arg0 to read the counter. Setting 'testout' for in Arg0 will read the counter for 'testout' chains.

Operating Systems Linux
Requirements None
Scope Local
Workspace Wizard No
In Args
0Chains Name
Out Args
0The counter value of the last rule in the chain
Alarm Usage No
Graph Usage Yes, note data is of counter type.

Copyright (c) Warren Flemmer 2006www.net-probe.com