Skip to contentSkip to conversation

tableview.sh

LARTC Kenneth Kalmer 3 participants 3 messages May 13, 2005 – May 14, 2005

lore
Share & tools
lore
#0 lore 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

Signature · 7 lines
Kenneth Kalmer
[email protected]
http://opensourcery.blogspot.com
_______________________________________________
LARTC mailing list
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
#1 lore raw

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

#2 lore raw
In reply to Kenneth Kalmer

Aha so nice, i'm kinda excited to deploy the script to all of my servers ;) well done mate

thanks and regards

Askar

Quoted 85 lines · Kenneth Kalmer

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
[email protected]
http://opensourcery.blogspot.com

Signature · 2 lines
I love deadlines. I like the whooshing sound they make as they fly by.
Douglas Adams