CCL Home Page
Up Directory CCL iplisting.txt
#!/bin/bash

# I, Jan Labanowski, being of sound mind (said that, I probably only think so),
# took this script from:
# http://www.kalamazoolinux.org/presentations/20010417/list
# and used it and changed it for my own purposes...
# It will probably reside in /usr/sbin

IP_MODULES=`/sbin/lsmod | /bin/awk '{print $1}' | /bin/grep '^ip'`
if [ "${IP_MODULES}x" = "x" ]; then
   echo You do not have any iptables loaded.
   exit 0
else
   echo You have the following ip modules loaded: ${IP_MODULES}
fi

IPTABLES=/sbin/iptables

echo
echo '                                   FILTER TABLE'
echo
$IPTABLES -t filter -L -n -v --line-numbers
echo
echo '                                   NAT TABLE'
echo
$IPTABLES -t nat -L -v -n --line-numbers
echo
echo '                                  MANGLE TABLE'
echo
$IPTABLES -t mangle -L -v -n --line-numbers
Modified: Tue Dec 11 01:34:28 2001 GMT
Page accessed 7957 times since Tue Dec 11 21:04:12 2001 GMT