From: Alexander Marx Date: Mon, 27 May 2013 08:33:50 +0000 (+0200) Subject: Forward Firewall: BUGFIX: When creating DMZ Rules with MANUAL IP as source and afterw... X-Git-Url: http://git.ipfire.org/?p=people%2Fteissler%2Fipfire-2.x.git;a=commitdiff_plain;h=e1eef9d53e80503c97f86587d1f8e0fb99195a96 Forward Firewall: BUGFIX: When creating DMZ Rules with MANUAL IP as source and afterwards editing the rule, the rule was copied and not just edited. BUGFIX: When using SNAT (outbound) the rule does not seem to work. The NAT_SOURCE chain was on wron position in POSTROUTING --- diff --git a/html/cgi-bin/forwardfw.cgi b/html/cgi-bin/forwardfw.cgi index 0fbc030b6..35d0bc563 100755 --- a/html/cgi-bin/forwardfw.cgi +++ b/html/cgi-bin/forwardfw.cgi @@ -78,7 +78,7 @@ my %aliases=(); my %optionsfw=(); my %ifaces=(); -my $VERSION='0.9.9.6'; +my $VERSION='0.9.9.6a'; my $color; my $confignet = "${General::swroot}/fwhosts/customnetworks"; my $confighost = "${General::swroot}/fwhosts/customhosts"; @@ -596,7 +596,7 @@ sub addrule if (-f "${General::swroot}/forward/reread"){ print "
    $Lang::tr{'fwhost reread'}


"; } - &Header::openbox('100%', 'left', ""); + &Header::openbox('100%', 'left', $Lang::tr{'fwdfw menu'}); print "
"; print ""; print ""; @@ -2151,7 +2151,7 @@ sub saverule #print"6"; } #check if we change a DMZ to a FORWARD/DMZ - elsif($fwdfwsettings{'oldruletype'} eq 'DMZ' && $fwdfwsettings{'chain'} eq 'FORWARDFW' && $fwdfwsettings{$fwdfwsettings{'grp1'}} ne 'ORANGE'){ + elsif($fwdfwsettings{'oldruletype'} eq 'DMZ' && $fwdfwsettings{'chain'} eq 'FORWARDFW' && $fwdfwsettings{$fwdfwsettings{'grp1'}} ne 'ORANGE' && $checkorange ne 'on'){ &changerule($configdmz); #print"7"; } @@ -2194,7 +2194,7 @@ sub saverule #print"14"; } #check if we change a FORWARD rule to an DMZ - elsif($fwdfwsettings{'oldruletype'} eq 'FORWARDFW' && $fwdfwsettings{$fwdfwsettings{'grp1'}} eq 'ORANGE' || $checkorange eq 'on'){ + elsif($fwdfwsettings{'oldruletype'} eq 'FORWARDFW' && ($fwdfwsettings{$fwdfwsettings{'grp1'}} eq 'ORANGE' || $checkorange eq 'on')){ &changerule($configfwdfw); #print"15"; } diff --git a/src/initscripts/init.d/firewall b/src/initscripts/init.d/firewall index 183ff5ba2..200c1550e 100644 --- a/src/initscripts/init.d/firewall +++ b/src/initscripts/init.d/firewall @@ -243,7 +243,7 @@ case "$1" in /sbin/iptables -t nat -N NAT_DESTINATION /sbin/iptables -t nat -N NAT_SOURCE /sbin/iptables -t nat -A PREROUTING -j NAT_DESTINATION - /sbin/iptables -t nat -A POSTROUTING -j NAT_SOURCE + /sbin/iptables -t nat -I POSTROUTING 2 -j NAT_SOURCE # upnp chain for our upnp daemon