Skip to content

Commit c0440e8

Browse files
yadvrDaanHoogland
authored andcommitted
CLOUDSTACK-10317: Fix SNAT rules for additional public nics (#2476)
* CLOUDSTACK-10317: Fix SNAT rules for additional public nics This allows networks with additional public nics to have correct SNAT iptables rules applied on configuration. Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com> * update based on Wei's suggested change Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
1 parent c0b920f commit c0440e8

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

systemvm/debian/opt/cloud/bin/cs/CsAddress.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ def fw_router(self):
388388
self.fw.append(["mangle", "",
389389
"-A VPN_%s -j RETURN" % self.address['public_ip']])
390390
self.fw.append(["nat", "",
391-
"-A POSTROUTING -o eth2 -j SNAT --to-source %s" % self.address['public_ip']])
391+
"-A POSTROUTING -o %s -j SNAT --to-source %s" % (self.dev, self.cl.get_eth2_ip())])
392392
self.fw.append(["mangle", "",
393393
"-A PREROUTING -i %s -m state --state NEW " % self.dev +
394394
"-j CONNMARK --set-xmark %s/0xffffffff" % self.dnum])

0 commit comments

Comments
 (0)