DagSonsteboSB commented on a change in pull request #2476: CLOUDSTACK-10317: 
Fix SNAT rules for additional public nics
URL: https://github.com/apache/cloudstack/pull/2476#discussion_r172553658
 
 

 ##########
 File path: systemvm/debian/opt/cloud/bin/cs/CsAddress.py
 ##########
 @@ -388,7 +388,7 @@ def fw_router(self):
             self.fw.append(["mangle", "",
                             "-A VPN_%s -j RETURN" % self.address['public_ip']])
             self.fw.append(["nat", "",
-                            "-A POSTROUTING -o eth2 -j SNAT --to-source %s" % 
self.address['public_ip']])
+                            "-A POSTROUTING -o %s -j SNAT --to-source %s" % 
(self.dev, self.address['public_ip'])])
 
 Review comment:
   You are right @ustcweizhou - just tested this. Routing happens *after SNAT* 
hence translating all non-static NATed traffic to the source IP address on eth2 
works even if this means a SNAT rule against eth3, eth4, etc.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to