- Timestamp:
- Dec 11, 2008, 8:26:59 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
system/generators/nat_routerboard.php
r119 r123 1 1 <?php 2 chdir('/ var/www/html/dev/centrala/www');2 chdir('/a/www/centrala'); 3 3 include_once('global.php'); 4 4 5 5 $InetInterface = 'ether3'; 6 $Router = '192.168. 10.33';6 $Router = '192.168.0.11'; 7 7 8 8 $Commands = array(); … … 25 25 $Commands[] = ' /ip firewall nat add chain=srcnat out-interface='.$InetInterface.' action=masquerade comment="Default NAT"'; 26 26 // Redirect DNS port 27 $Commands[] = ' /ip firewall nat add chain=dstnat dst-address=212.111.4.174 protocol=tcp dst-port=53 in-interface='.$InetInterface.' action=dst-nat to-address=192.168.0.1 comment="DNS redirection"'; 27 $Commands[] = ' /ip firewall nat add chain=dstnat dst-address=212.111.4.174 protocol=tcp dst-port=53 in-interface='.$InetInterface.' action=dst-nat to-address=192.168.0.1 to-ports=53 comment="DNS redirection UDP"'; 28 $Commands[] = ' /ip firewall nat add chain=dstnat dst-address=212.111.4.174 protocol=udp dst-port=53 in-interface='.$InetInterface.' action=dst-nat to-address=192.168.0.1 to-ports=53 comment="DNS redirection UDP"'; 28 29 29 30 $Commands = addslashes(implode(';', $Commands)); 30 31 $Command = '/usr/bin/ssh -l admin-ssh -i /root/.ssh/id_dsa '.$Router.' "'.$Commands.'"'; 31 echo($Command."\n");32 //echo($Command."\n"); 32 33 exec($Command, $Output); 33 array_pop($Output);34 34 //array_pop($Output); 35 //print_r($Output); 35 36 36 37 /*
Note:
See TracChangeset
for help on using the changeset viewer.