Add the public source nat rule

This commit is contained in:
Hugo Trippaers 2014-08-22 15:41:57 +02:00 committed by wilderrodrigues
parent 80a149abb7
commit 6d12d94e0c
1 changed files with 3 additions and 1 deletions

View File

@ -407,7 +407,9 @@ class CsIP:
app = CsApache(self)
app.setup()
pwdsvc = CsPasswdSvc(self).setup()
elif self.get_type() == "public":
if self.address["source_nat"] == True:
fw.append(["nat","","-A POSTROUTING -j SNAT -o %s --to-source %s" % (self.dev, self.address['public_ip'])])
route.flush()
def list(self):