diff --git a/Shorewall2/changelog.txt b/Shorewall2/changelog.txt index 3cbcd33b3..8d82628b9 100644 --- a/Shorewall2/changelog.txt +++ b/Shorewall2/changelog.txt @@ -27,3 +27,7 @@ Changes since 2.0.3 nat firewall + +9) Fix syntax error in setup_nat() + + firewall diff --git a/Shorewall2/firewall b/Shorewall2/firewall index d4c0c4172..10069f139 100755 --- a/Shorewall2/firewall +++ b/Shorewall2/firewall @@ -1876,7 +1876,7 @@ delete_proxy_arp() { # Setup Static Network Address Translation (NAT) # setup_nat() { - local external, interface, internal, allints, localnat + local external= interface= internal= allints= localnat= do_one_nat() { local add_ip_aliases=$ADD_IP_ALIASES, iface=${interface%:*} @@ -2781,9 +2781,47 @@ process_action() # $1 = action createactionchain() # $1 = chain name { createchain $1 no + CHAIN=$1 + run_user_exit $CHAIN +} + +createlogactionchain() # $1 = Action Name, $2 = Log Level +{ + local actchain= + + eval actchain=\$${1}_actchain + + [ -n "$actchain" ] || actchain=1 + + CHAIN=${1}${actchain} + + eval ${1}_actchain=$(($actchain + 1)) + + createchain $CHAIN run_user_exit $1 } +find_logactionchain() # $1 = Action Name, $2 = Log Level +{ + local action=$1 level=$2 chains= + + eval chains="\$${action}_chains" + + set -- $chains + + while [ $# -gt 0 ]; do + [ "$1" = "$level" ] && { echo $2 ; return ; } + shift;shift + done + + createlogactionchain $action $level + + echo $CHAIN + + eval ${action}_chains=\"\$${action}_chains $level $CHAIN\" + +} + # # Read /etc/shorewall/actions and for each defined , pre-process # /etc/shorewall/action. diff --git a/Shorewall2/masq b/Shorewall2/masq index b386af063..abe4d61ba 100755 --- a/Shorewall2/masq +++ b/Shorewall2/masq @@ -70,7 +70,7 @@ # # Finally, you may also specify a comma-separated # list of ranges and/or addresses in this column. -# +# # This column may not contain DNS Names. # # If you want to leave this column empty