Pas tres propre.

On ne va quand meme pas NATer l'exterieur !

darcs-hash:20050728152605-d1718-dbc726f78d02674fef91f5331bad96cbb6277007.gz
This commit is contained in:
bernat 2005-07-28 17:26:05 +02:00
parent 3349df5d1f
commit d4eca1caea

View file

@ -466,7 +466,7 @@ class firewall_komaz(firewall_crans) :
iptables("-t nat -A PREROUTING -s %s -j ACCEPT" % self.zone_serveur ) iptables("-t nat -A PREROUTING -s %s -j ACCEPT" % self.zone_serveur )
iptables("-t nat -A PREROUTING -d %s -j ACCEPT" % self.zone_serveur ) iptables("-t nat -A PREROUTING -d %s -j ACCEPT" % self.zone_serveur )
iptables("-t nat -A PREROUTING -i %s -p tcp --dport 80 -s ! %s -j DNAT --to-destination 138.231.136.3:80" % (self.eth_int, self.zone_serveur) ) iptables("-t nat -A PREROUTING -i %s -p tcp --dport 80 -s ! %s -j DNAT --to-destination 138.231.136.3:80" % (self.eth_int, self.zone_serveur) )
iptables("-t nat -A POSTROUTING -o %s -p tcp --dport 80 -s ! %s -d 138.231.136.3 -j SNAT --to-source 138.231.136.4" % (self.eth_int, self.zone_serveur) ) iptables("-t nat -A POSTROUTING -o %s -p tcp --dport 80 -s 138.231.136.0/21 -d 138.231.136.3 -j SNAT --to-source 138.231.136.4" % self.eth_int )
iptables("-t nat -A PREROUTING -j TEST_MAC-IP") iptables("-t nat -A PREROUTING -j TEST_MAC-IP")
iptables("-t nat -P PREROUTING DROP") iptables("-t nat -P PREROUTING DROP")
iptables("-t nat -P OUTPUT ACCEPT") iptables("-t nat -P OUTPUT ACCEPT")