From 652cadb22cd400c0982a9e46135bcd6339bfae69 Mon Sep 17 00:00:00 2001 From: teastep Date: Sat, 17 Aug 2002 22:15:41 +0000 Subject: [PATCH] Add loopback class A to rfc1918 file git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@201 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall/firewall | 28 ++++++++++------------------ Shorewall/rfc1918 | 1 + 2 files changed, 11 insertions(+), 18 deletions(-) diff --git a/Shorewall/firewall b/Shorewall/firewall index a4dc05152..b1b67c9fe 100755 --- a/Shorewall/firewall +++ b/Shorewall/firewall @@ -1656,29 +1656,21 @@ add_a_rule() case $proto in tcp|udp|TCP|UDP|6|17) if [ -n "$port" -a "x${port}" != "x-" ]; then - if [ -n "$multioption" ]; then - if [ "$port" != "${port%,*}" ]; then - multiport="$multioption" - dports="--dports $port" - else - dports="--dport $port" - fi - else - dports="--dport $port" + dports="--dport" + if [ -n "$multioption" -a "$port" != "${port%,*}" ]; then + multiport="$multioption" + dports="--dports" fi + dports="$dports $ports" fi if [ -n "$cport" -a "x${cport}" != "x-" ]; then - if [ -n "$multioption" ]; then - if [ "$cport" != "${cport%,*}" ]; then - multiport="$multioption" - sports="--sports $cport" - else - sports="--sport $cport" - fi - else - sports="--sport $cport" + sports="--sport" + if [ -n "$multioption" -a "$cport" != "${cport%,*}" ]; then + multiport="$multioption" + sports="--sports" fi + sports="$sports $cport" fi ;; icmp|ICMP|1) diff --git a/Shorewall/rfc1918 b/Shorewall/rfc1918 index 196b8aacc..a2e066f49 100644 --- a/Shorewall/rfc1918 +++ b/Shorewall/rfc1918 @@ -51,6 +51,7 @@ 84.0.0.0/6 logdrop # Reserved 88.0.0.0/5 logdrop # Reserved 96.0.0.0/3 logdrop # Reserved +127.0.0.0/8 logdrop # Loopback 197.0.0.0/8 logdrop # Reserved 222.0.0.0/7 logdrop # Reserved 240.0.0.0/4 logdrop # Reserved