Changeset 235 for trunk/system/generators/nat_routerboard.php
- Timestamp:
- Jul 25, 2009, 7:31:03 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/system/generators/nat_routerboard.php
r213 r235 22 22 echo($Name.'('.$Interface['LocalIP'].'), '); 23 23 $Commands[] = ' /ip firewall nat add chain=srcnat src-address='.$Interface['LocalIP'].' out-interface='.$InetInterface.' action=src-nat to-addresses='.$Interface['ExternalIP'].' comment="'.$Name.'"'; 24 $Commands[] = ' /ip firewall nat add chain=dstnat dst-address='.$Interface['ExternalIP'].' in-interface='.$InetInterface.' action=dst-nat to-addresses='.$Interface['LocalIP'].' comment="'.$Name.'"'; 25 26 // Temporary old incoming public subnet range 27 $ExternalIPParts = explode('.', $Interface['ExternalIP']); 28 $ExternalIPParts[0] = 85; 29 $ExternalIPParts[1] = 92; 30 $ExternalIPParts[2] = 50; 31 $Interface['ExternalIP'] = implode('.', $ExternalIPParts); 24 32 $Commands[] = ' /ip firewall nat add chain=dstnat dst-address='.$Interface['ExternalIP'].' in-interface='.$InetInterface.' action=dst-nat to-addresses='.$Interface['LocalIP'].' comment="'.$Name.'"'; 25 33 }
Note:
See TracChangeset
for help on using the changeset viewer.