Changeset 7 for system/generators/iptables.php
- Timestamp:
- Jan 16, 2008, 8:43:31 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
system/generators/iptables.php
r1 r7 98 98 DB_Select('hosts', '*', 'name="MAIL"'); 99 99 $Row = DB_Row(); 100 exec('iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d 212.111. 16.94 -j DROP');100 exec('iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d 212.111.4.174 -j DROP'); 101 101 exec('iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d '.$Row['external_ip'].' -j DNAT --to-destination '.$Row['IP']); 102 102 exec('iptables -t nat -A PreroutingDNAT -p tcp -m tcp --dport 25 -d '.$Row['external_ip'].' -j ACCEPT'); 103 exec('iptables -t nat -A POSTROUTING -p tcp -m tcp --dport 25 -s 212.111. 16.94 -o eth1 -j SNAT --to-source '.$Row['external_ip']);103 exec('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
Note:
See TracChangeset
for help on using the changeset viewer.