From: Kenneth Kalmer <kenneth.kalmer@gmail.com>
To: netfilter@lists.netfilter.org, lartc <lartc@mailman.ds9a.nl>
Subject: tableview.sh
Date: Fri, 13 May 2005 18:48:44 +0200 [thread overview]
Message-ID: <fad9d484050513094833eb1148@mail.gmail.com> (raw)
netfilter and lartc members
I just thought it's time I contribute. I created this little script to
help me while setting up iptables rules for firewalling, shaping or
both. I hope this helps someone.
Called tableview.sh, inspired by Table Mountain, Cape Town, ZA :)
--- SOF ----
#!/bin/sh
# ____
# /\/ \/\
# /__________\
#
# Simple loop for keeping track of what is happening in a
# iptables setup
#
table_filter(){
echo
echo "FILTER TABLE"
echo "------------"
echo
iptables -nvL
}
table_mangle(){
echo
echo "MANGLE TABLE"
echo "------------"
echo
iptables -nvL -t mangle
}
table_nat(){
echo
echo "NAT TABLE"
echo "---------"
echo
iptables -nvL -t nat
}
footer(){
echo
echo "-------------------------------------------------------------"
echo "Show table: [F]ilter, [M]angle, [N]AT or hit return to reload"
}
last="filter"
while [ 1 ]; do
clear
case "$REPLY" in
"F" | "f" )
table_filter
last="filter"
;;
"M" | "m" )
table_mangle
last="mangle"
;;
"N" | "n" )
table_nat
last="nat"
;;
"Q" | "q" )
exit 0
;;
*)
table_$last
;;
esac
footer
read
done
--- EOF ---
Regards
--
Kenneth Kalmer
kenneth.kalmer@gmail.com
http://opensourcery.blogspot.com
next reply other threads:[~2005-05-13 16:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-05-13 16:48 Kenneth Kalmer [this message]
2005-05-13 17:02 ` tableview.sh Sebastião Antônio Campos (GWA)
2005-05-14 9:42 ` tableview.sh Askar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=fad9d484050513094833eb1148@mail.gmail.com \
--to=kenneth.kalmer@gmail.com \
--cc=lartc@mailman.ds9a.nl \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox