Changeset 272 for trunk/system


Ignore:
Timestamp:
Jan 10, 2010, 5:02:00 PM (15 years ago)
Author:
george
Message:
  • Upraveno: Zobrazení výpisů finančních operací klientů dle roků.
  • Přidáno: Skript pro periodickou kontrolu adres DHCP serverů a zajištění přenositelnosti IP adres klientů.
Location:
trunk/system/generators
Files:
1 added
2 edited

Legend:

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

    r267 r272  
    117117
    118118print_r($ItemsFirewall);
    119 //$Routerboard->ListUpdate($PathFirewall, array('chain', 'dst-address', 'in-interface', 'action', 'new-packet-mark', 'passthrough', 'comment', 'out-interface', 'src-address', 'jump-target'), $ItemsFirewall, array(), true);
     119$Routerboard->ListUpdate($PathFirewall, array('chain', 'dst-address', 'in-interface', 'action', 'new-packet-mark', 'passthrough', 'comment', 'out-interface', 'src-address', 'jump-target'), $ItemsFirewall, array(), true);
    120120
    121121?>
  • trunk/system/generators/firewall_nat.php

    r266 r272  
    2626    $Name = RouterOSIdent($Name);
    2727    echo($Name.'('.$Interface['LocalIP'].'), ');
    28     $Items[] = array('chain' => 'srcnat', 'src-address' => $Interface['LocalIP'], 'out-interface' => $InetInterface, 'action' => 'src-nat',  'to-addresses' => $Interface['ExternalIP'], 'comment' => $Name);
    29     $Items[] = array('chain' => 'dstnat', 'dst-address' => $Interface['ExternalIP'], 'in-interface' => $InetInterface, 'action' => 'dst-nat', 'to-addresses' => $Interface['LocalIP'], 'comment' => $Name);
     28    $Items[] = array('chain' => 'srcnat', 'src-address' => $Interface['LocalIP'], 'out-interface' => $InetInterface, 'action' => 'src-nat',  'to-addresses' => $Interface['ExternalIP'], 'comment' => $Name.'-out');
     29    $Items[] = array('chain' => 'dstnat', 'dst-address' => $Interface['ExternalIP'], 'in-interface' => $InetInterface, 'action' => 'dst-nat', 'to-addresses' => $Interface['LocalIP'], 'comment' => $Name.'-in');
    3030  }
    3131
     
    4141    if($Subnet['Mask'] == 32) $Src = $Subnet['AddressRange'];
    4242      else $Src = $Subnet['AddressRange'].'/'.$Subnet['Mask'];
    43     $Items[] = array('chain' => 'srcnat', 'src-address' => $Src, 'out-interface' => $InetInterface, 'action' => 'src-nat', 'to-addresses' => $Range, 'comment' => $Subnet['Name']);
     43    $Items[] = array('chain' => 'srcnat', 'src-address' => $Src, 'out-interface' => $InetInterface, 'action' => 'src-nat', 'to-addresses' => $Range, 'comment' => $Subnet['Name'].'-out');
    4444   
    4545    $Range = CIDRToAddressRange($Subnet['AddressRange'], $Subnet['Mask']);
     
    4848    if($Subnet['ExtMask'] == 32) $Dest = $Subnet['ExtAddressRange'];
    4949      else $Dest = $Subnet['ExtAddressRange'].'/'.$Subnet['ExtMask'];
    50     $Items[] = array('chain' => 'dstnat', 'dst-address' => $Dest, 'in-interface' => $InetInterface, 'action' => 'dst-nat',  'to-addresses' => $Range, 'comment' => $Subnet['Name']);
     50    $Items[] = array('chain' => 'dstnat', 'dst-address' => $Dest, 'in-interface' => $InetInterface, 'action' => 'dst-nat',  'to-addresses' => $Range, 'comment' => $Subnet['Name'].'-in');
    5151  }
    5252  echo("\n");
Note: See TracChangeset for help on using the changeset viewer.