richardlawley opened a new issue #3168: Static NAT with multiple public 
interfaces uses wrong outgoing IP
URL: https://github.com/apache/cloudstack/issues/3168
 
 
   <!--
   Verify first that your issue/request is not already reported on GitHub.
   Also test if the latest release and master branch are affected too.
   Always add information AFTER of these HTML comments, but no need to delete 
the comments.
   -->
   
   ##### ISSUE TYPE
   <!-- Pick one below and delete the rest -->
    * Bug Report
   
   ##### COMPONENT NAME
   <!--
   Categorize the issue, e.g. API, VR, VPN, UI, etc.
   -->
   ~~~
   VR
   ~~~
   
   ##### CLOUDSTACK VERSION
   <!--
   New line separated list of affected versions, commit ID for issues on master 
branch.
   -->
   
   ~~~
   4.11.2
   ~~~
   
   ##### CONFIGURATION
   <!--
   Information about the configuration if relevant, e.g. basic network, 
advanced networking, etc.  N/A otherwise
   -->
   Advanced Networking, XenServer 6.5, Non-VPC
   
   
   ##### SUMMARY
   <!-- Explain the problem/feature briefly -->
   This is a regression, caused by f60f3ce I believe.  When a VR has public IPs 
on multiple interfaces, a static NAT rule which is not on the first public 
interface will have outgoing traffic originating from the Source NAT IP.  I 
believe this is because the logic of marking packets was changed from interface 
number to 100+interface number everywhere *except* where the static NAT rules 
are configured in `configure.py`.
   
   I've been able to fix this temporarily in my own VR by changing 
[configure.py 
L930](https://github.com/apache/cloudstack/blob/master/systemvm/debian/opt/cloud/bin/configure.py#L930)
 from `hex(int(device[len("eth"):]))` to `hex(100 + int(device[len("eth"):]))`
   
   ##### STEPS TO REPRODUCE
   <!--
   For bugs, show exactly how to reproduce the problem, using a minimal 
test-case. Use Screenshots if accurate.
   
   For new features, show how the feature would be used.
   -->
   
   * Assign public IP from different subnet to VR (so that VR gets eth3 
created).  
   * Deploy a VM on this network
   * Create static NAT rule for this new public IP to the new VM
   * Run `curl -s http://ipecho.net/plain` inside the VM
   
   <!-- You can also paste gist.github.com links for larger files -->
   
   ##### EXPECTED RESULTS
   <!-- What did you expect to happen when running the steps above? -->
   
   Output should be the Static NAT IP
   
   Created firewall rule in mangle / PREROUTING should be: `state NEW MARK set 
0x67`
   
   ##### ACTUAL RESULTS
   <!-- What actually happened? -->
   
   Output is the Source NAT IP
   
   Created firewall rule in mangle / PREROUTING is be: `state NEW MARK set 0x3`

----------------------------------------------------------------
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