]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/commitdiff
Forward Firewall: bugfix: DNAT now correctly creates rules, when customservice define...
authorAlexander Marx <amarx@ipfire.org>
Sun, 31 Mar 2013 14:18:12 +0000 (16:18 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Fri, 9 Aug 2013 12:11:58 +0000 (14:11 +0200)
config/forwardfw/rules.pl

index 2ce3efabbcbef841db3cf97b2567e67135679dc0..9af2c7060ff3acb954d42b94b6cc04c2fe029d81 100755 (executable)
@@ -539,7 +539,11 @@ sub get_port
                        }
                }elsif($$hash{$key}[14] eq 'cust_srv'){
                        if ($prot ne 'ICMP'){
-                               return "--dport ".&fwlib::get_srv_port($$hash{$key}[15],1,$prot);
+                               if($$hash{$key}[31] eq 'dnat'){
+                                       return ":".&fwlib::get_srv_port($$hash{$key}[15],1,$prot);
+                               }else{
+                                       return "--dport ".&fwlib::get_srv_port($$hash{$key}[15],1,$prot);
+                               }
                        }elsif($prot eq 'ICMP' && $$hash{$key}[15] ne 'All ICMP-Types'){
                                return "--icmp-type ".&fwlib::get_srv_port($$hash{$key}[15],3,$prot);
                        }elsif($prot eq 'ICMP' && $$hash{$key}[15] eq 'All ICMP-Types'){