* tableview.sh
@ 2005-05-13 16:48 Kenneth Kalmer
2005-05-13 17:02 ` tableview.sh Sebastião Antônio Campos (GWA)
2005-05-14 9:42 ` tableview.sh Askar
0 siblings, 2 replies; 3+ messages in thread
From: Kenneth Kalmer @ 2005-05-13 16:48 UTC (permalink / raw)
To: netfilter, lartc
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tableview.sh
2005-05-13 16:48 tableview.sh Kenneth Kalmer
@ 2005-05-13 17:02 ` Sebastião Antônio Campos (GWA)
2005-05-14 9:42 ` tableview.sh Askar
1 sibling, 0 replies; 3+ messages in thread
From: Sebastião Antônio Campos (GWA) @ 2005-05-13 17:02 UTC (permalink / raw)
To: Kenneth Kalmer, netfilter, lartc
Valeu a contiruição
Já estou utilizando...
Very good Kenneth, the contribution is very nice... I love this list. The
people are so cool (nice).
Tião
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: tableview.sh
2005-05-13 16:48 tableview.sh Kenneth Kalmer
2005-05-13 17:02 ` tableview.sh Sebastião Antônio Campos (GWA)
@ 2005-05-14 9:42 ` Askar
1 sibling, 0 replies; 3+ messages in thread
From: Askar @ 2005-05-14 9:42 UTC (permalink / raw)
To: Kenneth Kalmer; +Cc: lartc, netfilter
Aha so nice, i'm kinda excited to deploy the script to all of my servers ;)
well done mate
thanks and regards
Askar
On 5/13/05, Kenneth Kalmer <kenneth.kalmer@gmail.com> wrote:
> 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
>
>
--
I love deadlines. I like the whooshing sound they make as they fly by.
Douglas Adams
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-14 9:42 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-13 16:48 tableview.sh Kenneth Kalmer
2005-05-13 17:02 ` tableview.sh Sebastião Antônio Campos (GWA)
2005-05-14 9:42 ` tableview.sh Askar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox