diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index 777f48779..edde51f13 100755 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -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. diff --git a/Shorewall/help b/Shorewall/help index 0403a6cc2..475c8df6a 100755 --- a/Shorewall/help +++ b/Shorewall/help @@ -253,7 +253,7 @@ save) ;; show) - echo "show: show [ [ ...] |actions|classifiers|connections|log|nat|tc|tos|zones] + echo "show: show [ [ ...] |actions|classifiers|connections|log|macros|nat|tc|tos|zones] shorewall [-x] show [ ... ] - 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. diff --git a/Shorewall/macro.AllowICMPs b/Shorewall/macro.AllowICMPs index 1c2489cd3..7a54deb19 100644 --- a/Shorewall/macro.AllowICMPs +++ b/Shorewall/macro.AllowICMPs @@ -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/ diff --git a/Shorewall/macro.IMAP b/Shorewall/macro.IMAP index 93dd39b3a..8e9515f7c 100644 --- a/Shorewall/macro.IMAP +++ b/Shorewall/macro.IMAP @@ -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/ diff --git a/Shorewall/macro.POP3 b/Shorewall/macro.POP3 index 4e4a3aca6..ace6127d0 100644 --- a/Shorewall/macro.POP3 +++ b/Shorewall/macro.POP3 @@ -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/ diff --git a/Shorewall/macro.SMB b/Shorewall/macro.SMB index 90cfb99b0..67bd6d308 100644 --- a/Shorewall/macro.SMB +++ b/Shorewall/macro.SMB @@ -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/ diff --git a/Shorewall/macro.SNMP b/Shorewall/macro.SNMP index 5239e8612..cfb92348d 100644 --- a/Shorewall/macro.SNMP +++ b/Shorewall/macro.SNMP @@ -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/ diff --git a/Shorewall/macro.Trcrt b/Shorewall/macro.Trcrt index 0c4e2483c..7ac217979 100644 --- a/Shorewall/macro.Trcrt +++ b/Shorewall/macro.Trcrt @@ -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/ diff --git a/Shorewall/macro.Web b/Shorewall/macro.Web index 45ca38292..b1264b11f 100644 --- a/Shorewall/macro.Web +++ b/Shorewall/macro.Web @@ -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/ diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index fb2106c78..5947515e6 100755 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -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 diff --git a/Shorewall/shorewall b/Shorewall/shorewall index d5c07097d..fb4e47369 100755 --- a/Shorewall/shorewall +++ b/Shorewall/shorewall @@ -510,7 +510,7 @@ usage() # $1 = exit status echo " restart [ ]" echo " restore [ ]" echo " save [ ]" - echo " show [ [ ... ]|actions|capabilities|classifiers|connections|log|nat|tc|tos|zones]" + echo " show [ [ ... ]|actions|capabilities|classifiers|connections|log|macros|nat|tc|tos|zones]" echo " start [ ]" 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