From issues-return-92900-archive-asf-public=cust-asf.ponee.io@cloudstack.apache.org Fri Jun 22 18:40:04 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id D59F3180647 for ; Fri, 22 Jun 2018 18:40:03 +0200 (CEST) Received: (qmail 97133 invoked by uid 500); 22 Jun 2018 16:40:02 -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 97124 invoked by uid 500); 22 Jun 2018 16:40:02 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 97121 invoked by uid 99); 22 Jun 2018 16:40:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Jun 2018 16:40:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 6F65A180848 for ; Fri, 22 Jun 2018 16:40:02 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.511 X-Spam-Level: X-Spam-Status: No, score=-109.511 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, T_RP_MATCHES_RCVD=-0.01, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id fRMiKuv0N1WS for ; Fri, 22 Jun 2018 16:40:01 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id 0ECD85F35A for ; Fri, 22 Jun 2018 16:40:01 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 9B5F1E07FC for ; Fri, 22 Jun 2018 16:40:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 5BBBE23F99 for ; Fri, 22 Jun 2018 16:40:00 +0000 (UTC) Date: Fri, 22 Jun 2018 16:40:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-10346) Problem with NAT configuration and VMs not accessing each other via public IPs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-10346?page=3Dcom.atl= assian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId= =3D16520571#comment-16520571 ]=20 ASF GitHub Bot commented on CLOUDSTACK-10346: --------------------------------------------- izenk edited a comment on issue #2514: [CLOUDSTACK-10346] Problem with NAT = configuration and VMs not accessing each other via public IPs URL: https://github.com/apache/cloudstack/pull/2514#issuecomment-399504872 =20 =20 @rhtyd=20 Sorry for asking here, but can't understand if my situation is covered b= y this fix or not. =20 Am I understand correctly, now in 4.11.0.0 we can have such situation: vm1 -> vpc1 -> vr1:SNAT:public_ip (192.168.1.11) vm2 -> vpc2 -> vr2:SNAT:public_ip (192.168.1.12) =20 Public network (192.168.0.0/16) gateway is 192.168.1.1 =20 Public network is on eth1 on VR and there is an iptables mark rule for i= t ~~~ #iptables-save |grep 0x1 -A PREROUTING -i eth1 -m state --state NEW -j CONNMARK --set-xmark 0x1/0= xffffffff ~~~ =20 vr1 has rule for public network: ~~~ 32763:=09from all fwmark 0x1 lookup Table_eth1 ~~~ and rules for table are: ~~~ #ip route show table Table_eth1 default via 192.168.1.1 dev eth1 proto static ~~~ =20 Such configuration means that vm2 can't connect to vm2 by public_ip(192.= 168.1.11), because it tries to route public ip through gate 192.168.1.1, wh= en it should not (because 1.11 and 1.12 are in the same network) ~~~ #ip route get 192.168.1.12 mark 0x1 192.168.1.12 via 192.168.1.1 dev eth1 table Table_eth1 src 192.168.1.11 = mark 1 ~~~ =20 So, the result table should be: ~~~ #ip route show table Table_eth1 default via 192.168.1.1 dev eth1 proto static 192.168.0.0/16 dev eth1 scope link ~~~ =20 ---------------------------------------------------------------- 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. =20 For queries about this service, please contact Infrastructure at: users@infra.apache.org > Problem with NAT configuration and VMs not accessing each other via publi= c IPs > -------------------------------------------------------------------------= ----- > > Key: CLOUDSTACK-10346 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-103= 46 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the defa= ult.)=20 > Reporter: Rafael Weing=C3=A4rtner > Assignee: Rafael Weing=C3=A4rtner > Priority: Major > > When users create a VPC, and configure a NAT from a public IP to applicat= ion in a VM. This VM(applications) are not accessible via public IP for oth= er VMs in the same VPC. > =20 > The problem is in the NAT table. If you take a closer look at rules, you = will see something like: > {code:java} > -A PREROUTING -d publicIP/32 -i eth1 -p tcp -m tcp --dport 80 -j DNAT --t= o-destination internalIp:80 > {code} > The problem is that according to this rule only packets coming via eth1(p= ublic interface), will be =E2=80=9Credirected=E2=80=9D to the internal IP. = We need an extra entry to each one of the NAT configurations. For the prese= nted rule, we would need something like: > {code:java} > -A PREROUTING -d publicIP/32 -i eth2 -p tcp -m tcp --dport 80 -j DNAT --t= o-destination internalIp:80 > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)