Ignore:
Timestamp:
Dec 3, 2008, 11:36:51 AM (16 years ago)
Author:
george
Message:
  • Upraveno: Z nastavení firewallu odebráno virtuální přesměrování DNS serveru na jinou IP.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • system/generators/iptables.php

    r116 r118  
    3838{
    3939  //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');
    4141  while($Row = $DbResult2->fetch_array())
    4242  {
     
    5656        //  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');
    5757        //}
    58         if(strtolower($Row['name']) != 'centrala')
     58        if(strtolower($Row['name']) != 'gate')
    5959        {
    6060          if($Row['external_ip'] != '')
     
    9696
    9797// 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']);
    104104
    105105// Local network NAT
Note: See TracChangeset for help on using the changeset viewer.