Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B15BB17FE0 for ; Wed, 27 May 2015 08:43:20 +0000 (UTC) Received: (qmail 76207 invoked by uid 500); 27 May 2015 08:43:17 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 76173 invoked by uid 500); 27 May 2015 08:43:17 -0000 Mailing-List: contact issues-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list issues@cloudstack.apache.org Received: (qmail 76164 invoked by uid 500); 27 May 2015 08:43:17 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 76161 invoked by uid 99); 27 May 2015 08:43:17 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 27 May 2015 08:43:17 +0000 Date: Wed, 27 May 2015 08:43:17 +0000 (UTC) From: "Andrija Panic (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Comment Edited] (CLOUDSTACK-8451) Static Nat show wrong remote IP in VM behind VPC MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-8451?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14560646#comment-14560646 ] Andrija Panic edited comment on CLOUDSTACK-8451 at 5/27/15 8:43 AM: -------------------------------------------------------------------- Hi, I confirmed I dont have problems when deploy "public" network with tagged vlan, instead of untagged. Meaning, I dont have eth2 referenced in iptables rules, and remote IP shows correctly. So this is some regression, due to chaning untagged URI from NULL to vlan://untagged or something - that happened between 4.2 and 4.3 releases if Im not mistaken. Anyone can reproduce please - just use untagged vlan for Public range, and the problem will arise. was (Author: andrija): Hi, I confirmed I dont have problems when deploy "public" network with tagged vlan, instead of untagged. So this is some regression, due to chanign untagged URI from NULL to vlan://untagged or something - that happened between 4.2 and 4.3 releases if Im not mistaken. Anyone can reproduce please - just use untagged vlan for Public range, and the problem will arise. > Static Nat show wrong remote IP in VM behind VPC > ------------------------------------------------ > > Key: CLOUDSTACK-8451 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-8451 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: KVM, Network Controller, Virtual Router > Affects Versions: 4.4.3, 4.3.2, 4.5.1 > Environment: Ubuntu 14.04, ACS 4.5.1-SNAPSHOT > Reporter: Andrija Panic > Assignee: Rohit Yadav > > When configuring Port FOrwarding or Static NAT on VPC VR, and connect from outside world to VPC IP address, traffic gets forwarded to VM behind VPC. > But if you run "netstat -antup | grep $PORT" (where port is i.e. ssh port) - given result will show that remote connections come from the Source NAT IP of the VR, instead of the real remote client IP. > Example: > private VM: 192.168.10.10 > Source NAT IP on VPC VR: 1.1.1.1 > Additional Public IP on VPC VR. 1.1.1.2 > Remote client public IP: 4.4.4.4 (external to VPC) > Test: > from 4.4.4.4 SSH to 1.1.1.2 port 22 (or any other port) > inside 192.168.10.10 do "netstat -antup | grep 22" > Result: Remote IP show is 1.1.1.1 instead of 4.4.4.4 > We found a solution (somwhat tested, and not sure if this would break anything...) > Problem is in VRs iptables NAT table, POSTROUTING chain, rule: > SNAT all -- * eth2 0.0.0.0/0 0.0.0.0/0 to:1.1.1.1 > where 1.1.1.1 is public IP of VR > eth2: is Public Interface of VR > When this rule is deleted, NAT is working fine. > This is serious issue for anyone using VPC, since there is no way to see real remote client IP, and this no firewall funtionality inside VM, SIP doesnt work, web server logs are useless etc. > I also experienced this problem with 4.3.x releases. -- This message was sent by Atlassian JIRA (v6.3.4#6332)