diff --git a/Shorewall/changelog.txt b/Shorewall/changelog.txt index 8b9d2d140..ff4815e62 100644 --- a/Shorewall/changelog.txt +++ b/Shorewall/changelog.txt @@ -101,3 +101,5 @@ Changes in 3.1.x. define_firewall().) 43) Add Simon's redhat prog files. + +44) Add 'delete_nat' to compiled program. diff --git a/Shorewall/compiler b/Shorewall/compiler index f58c46d06..5f06d7984 100755 --- a/Shorewall/compiler +++ b/Shorewall/compiler @@ -8128,6 +8128,19 @@ stop_firewall() { \$IPTABLES -A \$1 -m state --state ESTABLISHED,RELATED -j ACCEPT } + delete_nat() { + \$IPTABLES -t nat -F + \$IPTABLES -t nat -X + + if [ -f /var/lib/shorewall/nat ]; then + while read external interface; do + qt ip addr del $external dev $interface + done < /var/lib/shorewall/nat + + rm -f {/var/lib/shorewall}/nat + fi + } + case \$COMMAND in stop|clear) ;; diff --git a/Shorewall/releasenotes.txt b/Shorewall/releasenotes.txt index 81db9274c..d31c23166 100644 --- a/Shorewall/releasenotes.txt +++ b/Shorewall/releasenotes.txt @@ -35,6 +35,9 @@ Problems Corrected in 3.1.9 2) If any extension script used 'set --' (like the 'Limit' standard action extension script) then 'shorewall restore' would fail. +3) An undefined function 'delete_nat' was previously called when a compiled + program was issued the 'stop' or 'clear' command. + Other changes in 3.1.9 1) The 'redhat' distribution is now supported in the compile command's -d