Ignore:
Timestamp:
Oct 3, 2010, 1:51:44 PM (14 years ago)
Author:
george
Message:
  • Opraveno: Generování nat a filter pravidel firewallu.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/system/generators/firewall_nat.php

    r298 r299  
    1313
    1414$InetInterface = $Config['MainRouter']['InetInterface'];
    15 $LocalInterface = $Config['MainRouter']['InetInterface'];
     15$LocalInterface = $Config['MainRouter']['LocalInterface'];
    1616$IPCentrala = '10.145.64.8';
    1717
     
    5454    } else
    5555    {
    56       $Items[] = array('chain' => 'dstnat', 'src-address' => $Interface['LocalIP'], 'dst-port' => 80, 'action' => 'dst-nat',  'to-addresses' => $IPCentrala, 'to-ports' => 81, 'comment' => $Name.'-out');
     56      $Items[] = array('chain' => 'dstnat', 'src-address' => $Interface['LocalIP'], 'protocol' => 'tcp', 'dst-port' => 80, 'action' => 'dst-nat',  'to-addresses' => $IPCentrala, 'to-ports' => 81, 'comment' => $Name.'-out');
    5757    }
    5858  }
     
    8989      if($Subnet['Mask'] == 32) $Src = $Subnet['AddressRange'];
    9090        else $Src = $Subnet['AddressRange'].'/'.$Subnet['Mask'];
    91       $Items[] = array('chain' => 'dstnat', 'src-address' => $Src, 'dst-port' => 80, 'action' => 'dst-nat',  'to-addresses' => $IPCentrala, 'to-ports' => 81, 'comment' => $Subnet['Name'].'-out');
     91      $Items[] = array('chain' => 'dstnat', 'src-address' => $Src, 'protocol' => 'tcp', 'dst-port' => 80, 'action' => 'dst-nat',  'to-addresses' => $IPCentrala, 'to-ports' => 81, 'comment' => $Subnet['Name'].'-out');
    9292    }
    9393  }
Note: See TracChangeset for help on using the changeset viewer.