Ignore:
Timestamp:
Apr 14, 2015, 10:20:16 PM (10 years ago)
Author:
chronos
Message:
  • Removed: Spaces on end of line.
  • Modified: Tabs converted to spaces.
Location:
trunk/Modules/NetworkConfigLinux/Generators
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/Modules/NetworkConfigLinux/Generators/DHCP.php

    r548 r738  
    3636    fputs($File, "  host ".$Data."\t{ fixed-address ".$Row['IP'].";\thardware ethernet ".$Row['MAC']."; }\n");
    3737  }
    38  
     38
    3939  fputs($File, "}\n\n");
    4040}
  • trunk/Modules/NetworkConfigLinux/Generators/DNS.php

    r699 r738  
    137137    if(array_key_exists('IPv6', $Host) and ($Host['IPv6'] != ''))
    138138    {
    139         $Addr = new NetworkAddressIPv6();
    140         $Addr->AddressFromString($Host['IPv6']);
    141         $Octets = $Addr->GetOctets();
    142         $Octets = array_slice($Octets, 0, (128 - $Prefix) / 4);
    143         $Octets = implode('.', $Octets);
     139      $Addr = new NetworkAddressIPv6();
     140      $Addr->AddressFromString($Host['IPv6']);
     141      $Octets = $Addr->GetOctets();
     142      $Octets = array_slice($Octets, 0, (128 - $Prefix) / 4);
     143      $Octets = implode('.', $Octets);
    144144
    145145      $Host['Name'] = strtolower($Host['Name']);
     
    175175  'Alias' => array(),
    176176  'Network' => array('10.145.64', '10.145.65', '10.145.66', '10.145.67', '10.145.68',
    177         '10.145.69', '10.145.70', '10.145.71', '77.92.221', '172.16.0', '172.16.1'),
    178         'IPv6Network' => array('2a00:e580:244::/48'),
     177    '10.145.69', '10.145.70', '10.145.71', '77.92.221', '172.16.0', '172.16.1'),
     178  'IPv6Network' => array('2a00:e580:244::/48'),
    179179);
    180180
     
    237237  'Alias' => array(),
    238238  'Network' => array('81.2.194', '193.86.238', '212.111.4', '77.92.221'),
    239         'IPv6Network' => array('2a00:e580:244::/48'),
     239  'IPv6Network' => array('2a00:e580:244::/48'),
    240240);
    241241
     
    278278  'Network' => array('10.145.64', '10.145.65', '10.145.66', '10.145.67',
    279279    '10.145.68', '10.145.69', '10.145.70', '10.145.71'),
    280         'IPv6Network' => array(),
     280  'IPv6Network' => array(),
    281281);
    282282
     
    317317  'Alias' => array(),
    318318  'Network' => array('10.145.64', '10.145.65', '10.145.66', '10.145.67',
    319         '10.145.68', '10.145.69', '10.145.70', '10.145.71'),
    320         'IPv6Network' => array(),
     319    '10.145.68', '10.145.69', '10.145.70', '10.145.71'),
     320  'IPv6Network' => array(),
    321321);
    322322
  • trunk/Modules/NetworkConfigLinux/Generators/IPTables.php

    r548 r738  
    1313/*
    1414// Blocking according IP address
    15 $DbResult = $Database->select('users', '*', 'inet = 0'); 
     15$DbResult = $Database->select('users', '*', 'inet = 0');
    1616while($User = $DbResult->fetch_array())
    1717{
     
    4848      //    else exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Local");
    4949    } else {
    50       if($Row['vpn'] == 0) 
     50      if($Row['vpn'] == 0)
    5151      {
    52         $CZFreeLocalIP = $Row['IP'];
     52  $CZFreeLocalIP = $Row['IP'];
    5353        //echo($Row['external_ip']."\n");
    54         //if($Row['name'] == 'TBC')
    55         //{
     54  //if($Row['name'] == 'TBC')
     55  //{
    5656        //  exec('/sbin/iptables -t nat -A PreroutingDNAT -m tcp -p tcp --dport 3724 -d '.$Row['external_ip'].' -j DNAT --to-destination '.$Row['IP'].':3725');
    5757        //  exec('/sbin/iptables -t nat -A POSTROUTING -m tcp -p tcp -s '.$Row['IP'].' --sport 3725 -o '.$InetInterface.' -j SNAT --to-source '.$Row['external_ip'].':3724');
    58         //}
     58  //}
    5959        if(strtolower($Row['name']) != 'gate')
    60         {
    61           if($Row['external_ip'] != '')
     60  {
     61      if($Row['external_ip'] != '')
    6262          {
    6363            echo($Row['name'].'='.$Row['external_ip']."\n");
    64            
     64
    6565            exec('/sbin/iptables -t nat -A PreroutingDNAT -i '.$InetInterface.' -d '.$Row['external_ip'].' -j DNAT --to-destination '.$Row['IP']);
    6666            exec('/sbin/iptables -t nat -A PreroutingDNAT -i '.$InetInterface.' -d '.$Row['external_ip'].' -j ACCEPT');
    6767            exec('/sbin/iptables -t nat -A POSTROUTING -s '.$Row['IP'].' -o '.$InetInterface.' -j SNAT --to-source '.$Row['external_ip']);
    68           }
     68      }
    6969          //exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Proxy");
    70         }
     70  }
    7171      }
    7272      else
    7373      {
    74         $CZFreeLocalIP = $Row['external_ip'];
     74  $CZFreeLocalIP = $Row['external_ip'];
    7575 //echo('vpn');
    7676        //exec('/sbin/iptables -t nat -A PreroutingDNAT -s '.$Row['IP'].' -p udp -m udp --dport 55556 -j DROP');
     
    7979
    8080        //if($Row['vpn'] == 1)
    81         //{
    82           //exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Local");
     81  //{
     82    //exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Local");
    8383        //} else if($Row['vpn'] == 2) exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Proxy");
    8484      }
  • trunk/Modules/NetworkConfigLinux/Generators/NAT.php

    r548 r738  
    1313/*
    1414// Blocking according IP address
    15 $DbResult = $Database->select('users', '*', 'inet = 0'); 
     15$DbResult = $Database->select('users', '*', 'inet = 0');
    1616while($User = $DbResult->fetch_array())
    1717{
     
    4848      //    else exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Local");
    4949    } else {
    50       if($Row['vpn'] == 0) 
     50      if($Row['vpn'] == 0)
    5151      {
    52         $CZFreeLocalIP = $Row['IP'];
     52  $CZFreeLocalIP = $Row['IP'];
    5353        //echo($Row['external_ip']."\n");
    54         //if($Row['name'] == 'TBC')
    55         //{
     54  //if($Row['name'] == 'TBC')
     55  //{
    5656        //  exec('/sbin/iptables -t nat -A PreroutingDNAT -m tcp -p tcp --dport 3724 -d '.$Row['external_ip'].' -j DNAT --to-destination '.$Row['IP'].':3725');
    5757        //  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');
    58         //}
     58  //}
    5959        if(strtolower($Row['name']) != 'centrala')
    60         {
    61           if($Row['external_ip'] != '')
     60  {
     61      if($Row['external_ip'] != '')
    6262          {
    6363            echo($Row['name'].'='.$Row['external_ip']."\n");
    64            
     64
    6565            exec('/sbin/iptables -t nat -A PreroutingDNAT -i eth1 -d '.$Row['external_ip'].' -j DNAT --to-destination '.$Row['IP']);
    6666            exec('/sbin/iptables -t nat -A PreroutingDNAT -i eth1 -d '.$Row['external_ip'].' -j ACCEPT');
    6767            exec('/sbin/iptables -t nat -A POSTROUTING -s '.$Row['IP'].' -o eth1 -j SNAT --to-source '.$Row['external_ip']);
    68           }
     68      }
    6969          //exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Proxy");
    70         }
     70  }
    7171      }
    7272      else
    7373      {
    74         $CZFreeLocalIP = $Row['external_ip'];
     74  $CZFreeLocalIP = $Row['external_ip'];
    7575 //echo('vpn');
    7676        //exec('/sbin/iptables -t nat -A PreroutingDNAT -s '.$Row['IP'].' -p udp -m udp --dport 55556 -j DROP');
     
    7979
    8080        //if($Row['vpn'] == 1)
    81         //{
    82           //exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Local");
     81  //{
     82    //exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Local");
    8383        //} else if($Row['vpn'] == 2) exec('/sbin/iptables -t nat -A Block -m mac --mac-source '.$Row['MAC']." -j Proxy");
    8484      }
  • trunk/Modules/NetworkConfigLinux/Generators/TrafficShaping.php

    r548 r738  
    1010// Generate traffic shaping rules
    1111//$TotalMaxSpeedIn = 4048; //$RealMaxSpeed; //1536;
    12 //TotalMaxSpeedOut = 3048; //$RealMaxSpeed; //1536; 
     12//TotalMaxSpeedOut = 3048; //$RealMaxSpeed; //1536;
    1313//$UsersMaxSpeedIn = 1900; //$MaxSpeed;
    1414//$UsersMaxSpeedOut = 1900; //$MaxSpeed;
     
    4545
    4646  $FreeInetClass = 2;
    47  
     47
    4848  // In going traffic
    4949  fputs($File, "/sbin/tc qdisc del dev ".$InInterface." root\n");
    5050  if($Enabled)
    51   { 
     51  {
    5252    fputs($File, "/sbin/tc qdisc add dev ".$InInterface." root handle 1:0 htb default 2\n");
    5353    fputs($FileClassInfo, "1:1 Základní\n");
     
    6868    fputs($File, "/sbin/tc qdisc add dev ".$OutInterface." parent 1:".$FreeInetClass." handle ".$FreeInetClass.": sfq perturb 10\n");
    6969  }
    70  
     70
    7171  if(!$Enabled) die("Traffic shaping disabled\n");
    7272
    73   if($ClassesEnabled) 
     73  if($ClassesEnabled)
    7474  {
    7575  $ClassId = 3;
     
    9898  //$SpeedOut = round($UsersMaxSpeedOut / $InetUserCount);
    9999  $Prio = 1;
    100  
    101  
     100
     101
    102102  $AllUsersClassId = $ClassId;
    103103  $ClassId = $ClassId + 1;
     
    123123  fputs($FileClassInfo, '1:'.$TorrentClassId." Torrent\n");
    124124
    125   $DbResult = $Database->select('users', '*, CONCAT(second_name, " ", first_name) as fullname', '(inet=1)'); 
     125  $DbResult = $Database->select('users', '*, CONCAT(second_name, " ", first_name) as fullname', '(inet=1)');
    126126  while($User = $DbResult->fetch_array())
    127127  {
     
    144144
    145145    //echo('User class id: '.$UserClassId."\n");
    146  
     146
    147147    $DbResult2 = $Database->select('hosts', 'COUNT(*)', "block=0 AND MAC!='' AND user=".$User['id']);
    148148    $Row = $DbResult2->fetch_array();
     
    150150    $HostSpeedIn = round($SpeedIn / $HostCount);
    151151    $HostSpeedOut = round($SpeedOut / $HostCount);
    152  
     152
    153153    $DbResult2 = $Database->select('hosts','*',"block=0 AND MAC!='' AND user=".$User['id']);
    154154    while($Host = $DbResult2->fetch_array())
     
    164164        $Prio = 1;
    165165        if($Host['vpn'] == 1)
    166               {
    167                 if($Host['external_ip'] != '') $Host['IP'] = $Host['external_ip'];
    168                 else $Host['IP'] = ToVpnIp($Host);
    169               }
    170        
    171               //if($Host['name'] == 'TERMINAL') $SpeedDivider = 0.5;
    172                 //else
     166        {
     167          if($Host['external_ip'] != '') $Host['IP'] = $Host['external_ip'];
     168          else $Host['IP'] = ToVpnIp($Host);
     169        }
     170
     171        //if($Host['name'] == 'TERMINAL') $SpeedDivider = 0.5;
     172          //else
    173173        $SpeedDivider = 1;
    174174
    175               if($Host['name'] == 'centrala')
    176               {
    177                 $Host['IP'] = $Host['external_ip'];
    178                 $TableOut = 'OUTPUT';
    179                 $TableIn = 'INPUT';
    180                } else
     175        if($Host['name'] == 'centrala')
     176        {
     177          $Host['IP'] = $Host['external_ip'];
     178          $TableOut = 'OUTPUT';
     179          $TableIn = 'INPUT';
     180         } else
    181181         {
    182                  $TableOut = 'FORWARD';
    183                  $TableIn = 'FORWARD';
    184                }
    185               //if($Row['name'] == 'TERMINAL2') $Prio = 0;
    186         //      if($Row['name'] = 'TERMINAL2') $Prio = 0;
    187         if($Host['name'] == 'voip-hajda') $Protocol = ' -p tcp'; 
    188           else $Protocol = '';
    189         //      if($Host['name'] == 'KARLOS') $UserMaxSpeedIn = 128000;
     182           $TableOut = 'FORWARD';
     183           $TableIn = 'FORWARD';
     184         }
     185        //if($Row['name'] == 'TERMINAL2') $Prio = 0;
     186        //  if($Row['name'] = 'TERMINAL2') $Prio = 0;
     187        if($Host['name'] == 'voip-hajda') $Protocol = ' -p tcp';
     188        else $Protocol = '';
     189        //  if($Host['name'] == 'KARLOS') $UserMaxSpeedIn = 128000;
    190190        /*
    191 if($Host['name'] == 'GAME') 
    192         {
    193           exec('/sbin/iptables -t mangle -F game-server');       
    194                 $TableOut = 'game-server';
    195                 $TableIn = 'game-server';
    196         }*/
     191if($Host['name'] == 'GAME')
     192        {
     193          exec('/sbin/iptables -t mangle -F game-server');
     194          $TableOut = 'game-server';
     195          $TableIn = 'game-server';
     196        }*/
    197197        //if($Host['name'] == 'TBC') continue;
    198198
    199199        // In going traffic
    200         //exec('/sbin/iptables -t mangle -A '.$TableIn.' -i eth1 -d '.$Host['IP'].$Protocol." -j MARK --set-mark ".$HostClassId); 
    201               fputs($File, "/sbin/tc class add dev ".$InInterface." parent 1:".$UserClassId." classid 1:".$HostClassId." htb rate ".$HostSpeedIn."bit ceil ".$UserMaxSpeedIn."bit prio ".$Prio." quantum ".$Quantum."\n");
    202               fputs($File, "/sbin/tc qdisc add dev ".$InInterface." parent 1:".$HostClassId." handle ".$HostClassId.":0 sfq perturb 10\n");
    203             //fputs($File, "/sbin/tc filter add dev ".$InInterface." parent 1:0 protocol ip handle ".$HostClassId." fw flowid 1:".$UserClassId."\n");
    204             fputs($File, "/sbin/tc filter add dev ".$InInterface." parent 1:0 protocol ip prio 1 u32 match ip dst ".$Host['external_ip']."/32 flowid 1:".$HostClassId."\n");
    205        
     200        //exec('/sbin/iptables -t mangle -A '.$TableIn.' -i eth1 -d '.$Host['IP'].$Protocol." -j MARK --set-mark ".$HostClassId);
     201        fputs($File, "/sbin/tc class add dev ".$InInterface." parent 1:".$UserClassId." classid 1:".$HostClassId." htb rate ".$HostSpeedIn."bit ceil ".$UserMaxSpeedIn."bit prio ".$Prio." quantum ".$Quantum."\n");
     202        fputs($File, "/sbin/tc qdisc add dev ".$InInterface." parent 1:".$HostClassId." handle ".$HostClassId.":0 sfq perturb 10\n");
     203        //fputs($File, "/sbin/tc filter add dev ".$InInterface." parent 1:0 protocol ip handle ".$HostClassId." fw flowid 1:".$UserClassId."\n");
     204        fputs($File, "/sbin/tc filter add dev ".$InInterface." parent 1:0 protocol ip prio 1 u32 match ip dst ".$Host['external_ip']."/32 flowid 1:".$HostClassId."\n");
     205
    206206        // Out going traffic
    207207        //exec('/sbin/iptables -t mangle -A '.$TableOut.' -o eth1 -s '.$Host['IP'].$Protocol." -j MARK --set-mark ".$HostClassId);
    208         fputs($File, "/sbin/tc class add dev ".$OutInterface." parent 1:".$UserClassId." classid 1:".$HostClassId." htb rate ".$HostSpeedOut."bit ceil ".$UserMaxSpeedOut."bit prio ".$Prio." quantum ".$Quantum."\n");
    209               fputs($File, "/sbin/tc qdisc add dev ".$OutInterface." parent 1:".$HostClassId." handle ".$HostClassId.":0 sfq perturb 10\n");
    210               //fputs($File, "/sbin/tc filter add dev ".$OutInterface." parent 1:0 protocol ip handle ".$HostClassId." fw flowid 1:".$UserClassId."\n");
    211               fputs($File, "/sbin/tc filter add dev ".$OutInterface." parent 1:0 protocol ip prio 1 u32 match ip src ".$Host['external_ip']."/32 flowid 1:".$HostClassId."\n");
    212                //echo($Row['id'].',');
     208        fputs($File, "/sbin/tc class add dev ".$OutInterface." parent 1:".$UserClassId." classid 1:".$HostClassId." htb rate ".$HostSpeedOut."bit ceil ".$UserMaxSpeedOut."bit prio ".$Prio." quantum ".$Quantum."\n");
     209        fputs($File, "/sbin/tc qdisc add dev ".$OutInterface." parent 1:".$HostClassId." handle ".$HostClassId.":0 sfq perturb 10\n");
     210        //fputs($File, "/sbin/tc filter add dev ".$OutInterface." parent 1:0 protocol ip handle ".$HostClassId." fw flowid 1:".$UserClassId."\n");
     211        fputs($File, "/sbin/tc filter add dev ".$OutInterface." parent 1:0 protocol ip prio 1 u32 match ip src ".$Host['external_ip']."/32 flowid 1:".$HostClassId."\n");
     212         //echo($Row['id'].',');
    213213      }
    214214      // Free inet
    215215      if($Tarify[$User['inet_tarif_now']]['group_id'] == 3)
    216216      {
    217         //exec('/sbin/iptables -t mangle -A '.$TableIn.' -i eth1 -d '.$Host['IP'].$Protocol." -j MARK --set-mark ".$FreeInetClass); 
     217        //exec('/sbin/iptables -t mangle -A '.$TableIn.' -i eth1 -d '.$Host['IP'].$Protocol." -j MARK --set-mark ".$FreeInetClass);
    218218        //exec('/sbin/iptables -t mangle -A '.$TableOut.' -o eth1 -s '.$Host['IP'].$Protocol." -j MARK --set-mark ".$FreeInetClass);
    219219      }
    220220      // VoIP devices
    221221/*
    222       if(($Host['name'] == 'HAJDA-VOIP') || ($Host['name'] == 'NAVRATIL-VOIP')) 
     222      if(($Host['name'] == 'HAJDA-VOIP') || ($Host['name'] == 'NAVRATIL-VOIP'))
    223223      {
    224224        exec('/sbin/iptables -t mangle -A '.$TableIn." -i eth1 -d ".$Host['IP']." -p udp -j MARK --set-mark ".$VoipClassId);
    225225        exec('/sbin/iptables -t mangle -A '.$TableOut." -o eth1 -s ".$Host['IP']." -p udp -j MARK --set-mark ".$VoipClassId);
    226       } else 
     226      } else
    227227      if($Host['name'] == 'GAME')
    228228      {
    229         exec('/sbin/iptables -t mangle -A FORWARD -o eth1 -s '.$Host['IP']." -j game-server"); 
    230         exec('/sbin/iptables -t mangle -A FORWARD -i eth1 -d '.$Host['IP']." -j game-server"); 
    231    
     229        exec('/sbin/iptables -t mangle -A FORWARD -o eth1 -s '.$Host['IP']." -j game-server");
     230        exec('/sbin/iptables -t mangle -A FORWARD -i eth1 -d '.$Host['IP']." -j game-server");
     231
    232232        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -j MARK --set-mark ".$TorrentClassId);
    233233        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -j MARK --set-mark ".$TorrentClassId);
     
    237237
    238238        // Local services
    239               exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p icmp -j MARK --set-mark ".$HostClassId); // ICMP
     239        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p icmp -j MARK --set-mark ".$HostClassId); // ICMP
    240240        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p icmp -j MARK --set-mark ".$HostClassId);
    241241        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p tcp --sport 6969 -j MARK --set-mark ".$HostClassId); // web torrent
    242242        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 6969 -j MARK --set-mark ".$HostClassId);
    243243        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p tcp --sport 80 -j MARK --set-mark ".$HostClassId);   // web
    244         exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 80 -j MARK --set-mark ".$HostClassId); 
     244        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 80 -j MARK --set-mark ".$HostClassId);
    245245        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p tcp --sport 21 -j MARK --set-mark ".$HostClassId);    // FTP
    246246        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 21 -j MARK --set-mark ".$HostClassId);
     
    252252        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 22 -j MARK --set-mark ".$HostClassId);
    253253        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p tcp --sport 443 -j MARK --set-mark ".$HostClassId);   // https
    254               exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 443 -j MARK --set-mark ".$HostClassId);
     254        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 443 -j MARK --set-mark ".$HostClassId);
    255255        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p tcp --sport 27015 -j MARK --set-mark ".$HostClassId); // Counter Strike
    256256        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 27015 -j MARK --set-mark ".$HostClassId);
     
    259259        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p tcp --sport 5906 -j MARK --set-mark ".$HostClassId);  // VNC
    260260        exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --dport 5906 -j MARK --set-mark ".$HostClassId);
    261        
    262         // Remote services
     261
     262  // Remote services
    263263        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p tcp --dport 443 -j MARK --set-mark ".$HostClassId);   // https
    264         exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --sport 443 -j MARK --set-mark ".$HostClassId);
     264  exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --sport 443 -j MARK --set-mark ".$HostClassId);
    265265        exec('/sbin/iptables -t mangle -A game-server -o eth1 -s '.$Host['IP']." -p tcp --dport 80 -j MARK --set-mark ".$HostClassId);   // http
    266         exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --sport 80 -j MARK --set-mark ".$HostClassId);
    267        
     266  exec('/sbin/iptables -t mangle -A game-server -i eth1 -d '.$Host['IP']." -p tcp --sport 80 -j MARK --set-mark ".$HostClassId);
     267
    268268      }
    269269*/
Note: See TracChangeset for help on using the changeset viewer.