Changeset 315 for trunk


Ignore:
Timestamp:
Jun 1, 2011, 9:39:26 PM (13 years ago)
Author:
george
Message:
  • Upraveno: Příchozí pravidla pro NAT generovat jen pro vybrané místní adresy.
Location:
trunk
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/network/dostupnost.php

    r311 r315  
    4848   
    4949    $TableColumns = array(
    50       array('Name' => 'DeviceName', 'Title' => 'Jméno'),
     50      array('Name' => 'Name', 'Title' => 'Jméno'),
    5151    );   
    5252   
  • trunk/system/generators/firewall_nat.php

    r301 r315  
    4141  echo($Member['Name'].': ');
    4242  // Hosts
    43   $DbResult2 = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName FROM NetworkInterface LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE (NetworkInterface.ExternalIP <> "") AND (NetworkDevice.Member = '.$Member['Id'].') AND (NetworkInterface.LocalIP != NetworkInterface.ExternalIP) ORDER BY id DESC');
     43  $DbResult2 = $Database->query('SELECT NetworkInterface.*, NetworkDevice.Name AS DeviceName, NetworkDevice.InboundNATPriority FROM NetworkInterface LEFT JOIN NetworkDevice ON NetworkDevice.Id = NetworkInterface.Device WHERE (NetworkInterface.ExternalIP <> "") AND (NetworkDevice.Member = '.$Member['Id'].') AND (NetworkInterface.LocalIP != NetworkInterface.ExternalIP) ORDER BY id DESC');
    4444  while($Interface = $DbResult2->fetch_assoc())
    4545  {
     
    5151    {
    5252      $Items[] = array('chain' => 'inet-out', 'src-address' => $Interface['LocalIP'], 'action' => 'src-nat',  'to-addresses' => $Interface['ExternalIP'], 'comment' => $Name.'-out');
    53       $Items[] = array('chain' => 'inet-in', 'dst-address' => $Interface['ExternalIP'], 'action' => 'dst-nat', 'to-addresses' => $Interface['LocalIP'], 'comment' => $Name.'-in');
     53      if($Interface['InboundNATPriority'] > 0)
     54        $Items[] = array('chain' => 'inet-in', 'dst-address' => $Interface['ExternalIP'], 'action' => 'dst-nat', 'to-addresses' => $Interface['LocalIP'], 'comment' => $Name.'-in');
    5455    } else
    5556    {
Note: See TracChangeset for help on using the changeset viewer.