ASF GitHub Bot commented on CLOUDSTACK-10317:

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_r172526560

 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" % 
+                            "-A POSTROUTING -o %s -j SNAT --to-source %s" % 
(self.dev, self.address['public_ip'])])
 Review comment:
   Hi @ustcweizhou - in your scenario - does this not mean you end up SNATing 
on the wrong interface? So lets say you have eth2/VLAN10/ and 
eth3/VLAN20/ With your method that would SNAT to
   - A POSTROUTING -o eth3 -j SNAT --to-source
   So in other words the IP address would be right for the initial source NAT, 
but it would end up being translated on the wrong interface?

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:

> In case of multiple-public ips, snat fails to work for addtional public 
> nics/network for guest traffic
> ------------------------------------------------------------------------------------------------------
>                 Key: CLOUDSTACK-10317
>                 URL: https://issues.apache.org/jira/browse/CLOUDSTACK-10317
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the 
> default.) 
>            Reporter: Rohit Yadav
>            Assignee: Rohit Yadav
>            Priority: Minor
>             Fix For:,
> If a VR has two+ public nics, traffic from guest VM fails to be NAT-ed 
> correctly for traffic towards additional public nics.

This message was sent by Atlassian JIRA

Reply via email to