Changeset 272 for trunk/system
- Timestamp:
- Jan 10, 2010, 5:02:00 PM (15 years ago)
- Location:
- trunk/system/generators
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/firewall_mangle.php
r267 r272 117 117 118 118 print_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); 120 120 121 121 ?> -
trunk/system/generators/firewall_nat.php
r266 r272 26 26 $Name = RouterOSIdent($Name); 27 27 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'); 30 30 } 31 31 … … 41 41 if($Subnet['Mask'] == 32) $Src = $Subnet['AddressRange']; 42 42 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'); 44 44 45 45 $Range = CIDRToAddressRange($Subnet['AddressRange'], $Subnet['Mask']); … … 48 48 if($Subnet['ExtMask'] == 32) $Dest = $Subnet['ExtAddressRange']; 49 49 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'); 51 51 } 52 52 echo("\n");
Note:
See TracChangeset
for help on using the changeset viewer.