mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-20 01:37:59 +02:00
Allow display of multiple chains in 'shorewall show'
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@716 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
52f6ce84ad
commit
b32b250743
@ -195,8 +195,8 @@ save)
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
show)
|
show)
|
||||||
echo "show: show [<chain>|classifiers|connections|log|nat|tc|tos]
|
echo "show: show [<chain> [ <chain> ...] |classifiers|connections|log|nat|tc|tos]
|
||||||
shorewall show chain - produce a verbose report about the IPtable chains.
|
shorewall show <chain> [ <chain> ... ] - produce a verbose report about the IPtable chain(s).
|
||||||
(iptables -L chain -n -v)
|
(iptables -L chain -n -v)
|
||||||
|
|
||||||
shorewall show nat - produce a verbose report about the nat table.
|
shorewall show nat - produce a verbose report about the nat table.
|
||||||
|
@ -293,5 +293,6 @@ New Features:
|
|||||||
zones individually rather than as a single limit for all pairs of
|
zones individually rather than as a single limit for all pairs of
|
||||||
zones covered by the rule.
|
zones covered by the rule.
|
||||||
|
|
||||||
|
10) Multiple chains may now be displayed in one "shorewall show"
|
||||||
|
command (e.g., shorewall show INPUT FORWARD OUTOUT).
|
||||||
|
|
||||||
|
@ -51,7 +51,7 @@
|
|||||||
# compensate for a change of
|
# compensate for a change of
|
||||||
# broadcast address on any "detect"
|
# broadcast address on any "detect"
|
||||||
# interface.
|
# interface.
|
||||||
# shorewall show <chain> Display the rules in a <chain>
|
# shorewall show <chain> [ <chain> ... ] Display the rules in each <chain> listed
|
||||||
# shorewall show log Print the last 20 log messages
|
# shorewall show log Print the last 20 log messages
|
||||||
# shorewall show connections Show the kernel's connection
|
# shorewall show connections Show the kernel's connection
|
||||||
# tracking table
|
# tracking table
|
||||||
@ -590,7 +590,7 @@ usage() # $1 = exit status
|
|||||||
echo " reset"
|
echo " reset"
|
||||||
echo " restart"
|
echo " restart"
|
||||||
echo " save"
|
echo " save"
|
||||||
echo " show [<chain>|classifiers|connections|log|nat|tc|tos]"
|
echo " show [<chain> [ <chain> ... ]|classifiers|connections|log|nat|tc|tos]"
|
||||||
echo " start"
|
echo " start"
|
||||||
echo " stop"
|
echo " stop"
|
||||||
echo " status"
|
echo " status"
|
||||||
@ -738,26 +738,29 @@ case "$1" in
|
|||||||
exec $SHOREWALL_SHELL $FIREWALL $debugging $nolock $1 $2 $3
|
exec $SHOREWALL_SHELL $FIREWALL $debugging $nolock $1 $2 $3
|
||||||
;;
|
;;
|
||||||
show|list)
|
show|list)
|
||||||
[ $# -gt 2 ] && usage 1
|
|
||||||
case "$2" in
|
case "$2" in
|
||||||
connections)
|
connections)
|
||||||
|
[ $# -gt 2 ] && usage 1
|
||||||
echo "Shorewall-$version Connections at $HOSTNAME - `date`"
|
echo "Shorewall-$version Connections at $HOSTNAME - `date`"
|
||||||
echo
|
echo
|
||||||
cat /proc/net/ip_conntrack
|
cat /proc/net/ip_conntrack
|
||||||
;;
|
;;
|
||||||
nat)
|
nat)
|
||||||
|
[ $# -gt 2 ] && usage 1
|
||||||
echo "Shorewall-$version NAT at $HOSTNAME - `date`"
|
echo "Shorewall-$version NAT at $HOSTNAME - `date`"
|
||||||
echo
|
echo
|
||||||
show_reset
|
show_reset
|
||||||
iptables -t nat -L -n -v
|
iptables -t nat -L -n -v
|
||||||
;;
|
;;
|
||||||
tos|mangle)
|
tos|mangle)
|
||||||
|
[ $# -gt 2 ] && usage 1
|
||||||
echo "Shorewall-$version TOS at $HOSTNAME - `date`"
|
echo "Shorewall-$version TOS at $HOSTNAME - `date`"
|
||||||
echo
|
echo
|
||||||
show_reset
|
show_reset
|
||||||
iptables -t mangle -L -n -v
|
iptables -t mangle -L -n -v
|
||||||
;;
|
;;
|
||||||
log)
|
log)
|
||||||
|
[ $# -gt 2 ] && usage 1
|
||||||
get_config
|
get_config
|
||||||
echo "Shorewall-$version Log at $HOSTNAME - `date`"
|
echo "Shorewall-$version Log at $HOSTNAME - `date`"
|
||||||
echo
|
echo
|
||||||
@ -766,20 +769,26 @@ case "$1" in
|
|||||||
packet_log 20
|
packet_log 20
|
||||||
;;
|
;;
|
||||||
tc)
|
tc)
|
||||||
|
[ $# -gt 2 ] && usage 1
|
||||||
echo "Shorewall-$version Traffic Control at $HOSTNAME - `date`"
|
echo "Shorewall-$version Traffic Control at $HOSTNAME - `date`"
|
||||||
echo
|
echo
|
||||||
show_tc
|
show_tc
|
||||||
;;
|
;;
|
||||||
classifiers)
|
classifiers)
|
||||||
|
[ $# -gt 2 ] && usage 1
|
||||||
echo "Shorewall-$version Clasifiers at $HOSTNAME - `date`"
|
echo "Shorewall-$version Clasifiers at $HOSTNAME - `date`"
|
||||||
echo
|
echo
|
||||||
show_classifiers
|
show_classifiers
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Shorewall-$version Chain $2 at $HOSTNAME - `date`"
|
shift
|
||||||
|
|
||||||
|
echo "Shorewall-$version `[ $# -gt 1 ] && echo Chains || echo Chain` $* at $HOSTNAME - `date`"
|
||||||
echo
|
echo
|
||||||
show_reset
|
show_reset
|
||||||
iptables -L $2 -n -v
|
for chain in $*; do
|
||||||
|
iptables -L $chain -n -v
|
||||||
|
done
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user