Changeset 118
- Timestamp:
- Dec 3, 2008, 11:36:51 AM (16 years ago)
- Location:
- system/generators
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
system/generators/iptables.php
r116 r118 38 38 { 39 39 //echo($User['fullname']."\n"); 40 $DbResult2 = $Database->select('hosts', '*','block<2 AND MAC!="" AND user='.$User['id'].'ORDER BY id DESC');40 $DbResult2 = $Database->select('hosts', '*', '(block < 2) AND (MAC != "") AND (user='.$User['id'].') AND (IP != external_ip) ORDER BY id DESC'); 41 41 while($Row = $DbResult2->fetch_array()) 42 42 { … … 56 56 // exec('/sbin/iptables -t nat -A POSTROUTING -m tcp -p tcp -s '.$Row['IP'].' --sport 3725 -o eth1 -j SNAT --to-source '.$Row['external_ip'].':3724'); 57 57 //} 58 if(strtolower($Row['name']) != ' centrala')58 if(strtolower($Row['name']) != 'gate') 59 59 { 60 60 if($Row['external_ip'] != '') … … 96 96 97 97 // SMTP NAT port 25 98 $DbResult = $Database->select('hosts', '*', 'name="mail"');99 $Row = $DbResult->fetch_array();100 exec('/sbin/iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d 212.111.4.174 -j DROP');101 exec('/sbin/iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d '.$Row['external_ip'].' -j DNAT --to-destination '.$Row['IP']);102 exec('/sbin/iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d '.$Row['external_ip'].' -j ACCEPT');103 exec('/sbin/iptables -t nat -A POSTROUTING -p tcp -m tcp --dport 25 -s 212.111.4.174 -o eth1 -j SNAT --to-source '.$Row['external_ip']);98 //$DbResult = $Database->select('hosts', '*', 'name="mail"'); 99 //$Row = $DbResult->fetch_array(); 100 //exec('/sbin/iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d 212.111.4.174 -j DROP'); 101 //exec('/sbin/iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d '.$Row['external_ip'].' -j DNAT --to-destination '.$Row['IP']); 102 //exec('/sbin/iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d '.$Row['external_ip'].' -j ACCEPT'); 103 //exec('/sbin/iptables -t nat -A POSTROUTING -p tcp -m tcp --dport 25 -s 212.111.4.174 -o eth1 -j SNAT --to-source '.$Row['external_ip']); 104 104 105 105 // Local network NAT -
system/generators/traffic_shaping.php
r112 r118 104 104 fputs($File, "/sbin/tc class add dev ".$InInterface." parent 1:1 classid 1:".$AllUsersClassId." htb rate ".$UsersMaxSpeedIn."kbit prio 1 quantum 1500\n"); 105 105 fputs($File, "/sbin/tc class add dev ".$OutInterface." parent 1:1 classid 1:".$AllUsersClassId." htb rate ".$UsersMaxSpeedOut."kbit prio 1 quantum 1500\n"); 106 fputs($FileClassInfo, '1:'.$AllUsersClassId." Všichni uivatelé ");106 fputs($FileClassInfo, '1:'.$AllUsersClassId." Všichni uivatelé\n"); 107 107 108 108 // Torrent sharing
Note:
See TracChangeset
for help on using the changeset viewer.