shorewall show macros

git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@3083 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
teastep 2005-11-27 20:59:47 +00:00
parent 77c620e102
commit ffae7b5646
11 changed files with 40 additions and 11 deletions

View File

@ -1,3 +1,7 @@
Changes in 3.0.3
1) Implement "shorewall show macros"
Changes in 3.0.2
1) Typos in the Samples corrected.

View File

@ -253,7 +253,7 @@ save)
;;
show)
echo "show: show [ <chain> [ <chain> ...] |actions|classifiers|connections|log|nat|tc|tos|zones]
echo "show: show [ <chain> [ <chain> ...] |actions|classifiers|connections|log|macros|nat|tc|tos|zones]
shorewall [-x] show <chain> [ <chain> ... ] - produce a verbose report about the IPtable chain(s).
(iptables -L chain -n -v)
@ -268,6 +268,8 @@ show)
shorewall show log - display the last 20 packet log entries.
shorewall show macros -- displays the standard macros.
shorewall show connections - displays the IP connections currently
being tracked by the firewall.

View File

@ -3,7 +3,7 @@
#
# /usr/share/shorewall/macro.AllowICMPs
#
# ACCEPT needed ICMP types
# This macro ACCEPTs needed ICMP types
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/

View File

@ -3,7 +3,7 @@
#
# /usr/share/shorewall/macro.IMAP
#
# This macro handles IMAP traffic (secure and insecure):
# This macro handles IMAP traffic (secure and insecure).
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/

View File

@ -3,7 +3,7 @@
#
# /usr/share/shorewall/macro.POP3
#
# This macro handles POP3 traffic (secure and insecure):
# This macro handles POP3 traffic (secure and insecure).
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/

View File

@ -3,8 +3,8 @@
#
# /usr/share/shorewall/macro.SMB
#
# Handle Microsoft SMB traffic. You need to invoke this macro in
# both directions.
# This macro handle Microsoft SMB traffic. You need to invoke this macro
# in both directions.
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/

View File

@ -3,7 +3,7 @@
#
# /usr/share/shorewall/macro.SNMP
#
# This macro accepts SNMP traffic (including traps):
# This macro accepts SNMP traffic (including traps).
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/

View File

@ -3,7 +3,7 @@
#
# /usr/share/shorewall/macro.Trcrt
#
# This macro handles Traceroute (for up to 30 hops):
# This macro handles Traceroute (for up to 30 hops).
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/

View File

@ -3,7 +3,7 @@
#
# /usr/share/shorewall/macro.Web
#
# This macro handles WWW traffic (secure and insecure):
# This macro handles WWW traffic (secure and insecure).
#
###############################################################################
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/

View File

@ -1,4 +1,13 @@
Shorewall 3.0.2
Shorewall 3.0.3
Problems Corrected in 3.0.3
None.
New Features in 3.0.3
1) A "shorewall show macros" command has been added. This command displays
a list of the standard macros along with a brief description of each.
Problems Corrected in 3.0.2

View File

@ -510,7 +510,7 @@ usage() # $1 = exit status
echo " restart [ <directory> ]"
echo " restore [ <file name> ]"
echo " save [ <file name> ]"
echo " show [<chain> [ <chain> ... ]|actions|capabilities|classifiers|connections|log|nat|tc|tos|zones]"
echo " show [<chain> [ <chain> ... ]|actions|capabilities|classifiers|connections|log|macros|nat|tc|tos|zones]"
echo " start [ <directory> ]"
echo " stop"
echo " status"
@ -913,6 +913,20 @@ case "$1" in
echo "forwardUPnP #Allow traffic that upnpd has redirected from"
cat /usr/share/shorewall/actions.std /etc/shorewall/actions | grep -Ev '^\#|^$'
;;
macros)
for macro in /usr/share/shorewall/macro.*; do
foo=`grep 'This macro' $macro | head -n 1`
if [ -n "$foo" ]; then
macro=${macro#*.}
foo=${foo%.*}
if [ ${#macro} -lt 4 ]; then
echo -e " $macro \t${foo#\#}"
else
echo " $macro ${foo#\#}"
fi
fi
done
;;
*)
shift