cloudstack-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <>
Subject [jira] [Commented] (CLOUDSTACK-8685) [VPC_VR] Default route is not configured on VPC VR
Date Fri, 14 Aug 2015 11:07:47 GMT


ASF subversion and git services commented on CLOUDSTACK-8685:

Commit 05a29f01b4de0e88e2f0fb99886573a25c87fea6 in cloudstack's branch refs/heads/master from
[;h=05a29f0 ]

Merge pull request #693 from remibergsma/s2svpn-fixes

Fix site-to-site VPN featureThis is work done together with @jayapalu on fixing the site2site
VPN. The first part was done in PR #690 by @jayapalu. On top of that, some other fixes were
needed and those are added in this PR. It made sense to make a new PR which includes all fixes
so we can actually test it.

The original PR #690 is already merged into this one, so can be closed. Since the commit ids
are kept the same, merging this will close both.

I closely compared the 4.4/4.5 implementation with the new 4.6 one. I did not only make it
work, but also added some security improvements (some of which were also in 4.4/4.5). I noticed
the pre shared key was being logged, so removed that as well.

This is how I tested and verified it:
When I have some time available, I'll write a Marvin test for it that we can include in the

It now works(tm) with one manual step due to CLOUDSTACK-8685:
We need a default gateway before site-to-site VPN will actually work. It will connect, but
not forward packets. The reason for this, is due to the iptables setup. VM1 has router1 as
gateway, but router1 does not know the route to VM2 so it will give up. With a default gateway,
the packets are about to be forwarded to the default gateway but when they reach eth1 the
public nic, iptables kicks in, does some magic and forwards it through the ipsec tunnel. So,
you need a default gw set to upstream.

Workaround for now is setting the route manually:
``route add default gw``  or  ``ip route add default via``

In other words, we need to fix CLOUDSTACK-8685 soon, too.

Thanks to @snuf @jayapalu!

@jayapalu @snuf could you please review this?

* pr/693:
  do not log sensitive site-to-site VPN PSK
  tighten security of site-to-site VPN
  CLOUDSTACK-8730: fix s2s iptables rules and ipsec config
  CLOUDSTACK-8710: Fixed applying iptables rules for s2s vpn

Signed-off-by: Remi Bergsma <>

> [VPC_VR] Default route is not configured on VPC VR
> --------------------------------------------------
>                 Key: CLOUDSTACK-8685
>                 URL:
>             Project: CloudStack
>          Issue Type: Bug
>      Security Level: Public(Anyone can view this level - this is the default.) 
>          Components: Network Controller
>    Affects Versions: 4.6.0
>         Environment: Advanced zone with VPC. Latest build from ACS master.
>            Reporter: Sanjeev N
>            Priority: Critical
>         Attachments:
> [VPC_VR] Default route is not configured on VPC VR
> Steps to reproduce:
> ================
> 1.Bring up CS in advanced zone 
> 2.Create VPC and wait for the VR to come into running state
> 3.Connect  to VR and verify route table information
> Result:
> ======
> Default route is not configured on VPC VR.
> root@r-9-VM:/var/cache/cloud# route -n
> Kernel IP routing table
> Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
>   U     0      0        0 eth2
>   U     0      0        0 eth3
>   U     0      0        0 eth1
>     U     0      0        0 eth0
> root@r-9-VM:/var/cache/cloud#
> Observations:
> ===========
> When vr boots up, we run cloud-early-config. This will clean if there is any default
route exists on VR. Then we execute to configure public nic and default route
via public nic. However, in the latest ACS master we are not executing
> For any configuration on VR , we are creating configuration file and applying it with 
> Looks like adding default route is missing in the confguration file.
> Following is the configuration file genearted on VR :
> 015-07-29 05:20:39,132 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-402:ctx-83549002)
VR Config file VR-d3b73941-7b3d-489a-bcc6-47c6a777c950.cfg got created in VR, ip
with content
> #Apache CloudStack Virtual Router Config File
> <version>
> 1.0
> </version>
> <file>
> /var/cache/cloud/ip_associations.json
> {"ip_address":[{"public_ip":"","source_nat":false,"add":true,"one_to_one_nat":false,"first_i_p":false,"gateway":"","netmask":"","vif_mac_address":"06:dd:e0:00:00:0e","nic_dev_id":1,"new_nic":false},{"public_ip":"","source_nat":false,"add":true,"one_to_one_nat":true,"first_i_p":false,"gateway":"","netmask":"","vif_mac_address":"06:dd:e0:00:00:0e","nic_dev_id":1,"new_nic":false}],"type":"ips"}
> </file>
> <script>
> /opt/cloud/bin/ ip_associations.json
> </script>
> <file>
> /var/cache/cloud/staticnat_rules.json
> {"rules":[{"revoke":false,"source_ip_address":"","source_port_range":"0:0","destination_ip_address":""}],"type":"staticnatrules"}
> </file>
> <script>
> /opt/cloud/bin/ staticnat_rules.json
> </script>
> <file>
> /var/cache/cloud/forwarding_rules.json
> {"rules":[{"revoke":false,"protocol":"tcp","source_ip_address":"","source_port_range":"22:22","destination_ip_address":"","destination_port_range":"22:22"}],"type":"forwardrules"}
> </file>
> <script>
> /opt/cloud/bin/ forwarding_rules.json
> </script>
> <file>
> /var/cache/cloud/network_acl.json
> {"device":"eth2","mac_address":"02:00:7c:a8:00:02","private_gateway_acl":false,"nic_ip":"","nic_netmask":"24","ingress_rules":[{"type":"tcp","first_port":22,"last_port":22,"cidr":"","allowed":true}],"egress_rules":[{"type":"icmp","icmp_type":-1,"icmp_code":-1,"cidr":"","allowed":true}],"type":"networkacl"}
> </file>
> <script>
> /opt/cloud/bin/ network_acl.json
> </script>
> <file>
> /var/cache/cloud/vm_dhcp_entry.json
> {"host_name":"VM-403a0536-ba54-404f-a664-1b14d039497c","mac_address":"02:00:10:ca:00:01","ipv4_adress":"","ipv6_duid":"00:03:00:01:02:00:10:ca:00:01","default_gateway":"","default_entry":true,"type":"dhcpentry"}
> </file>
> <script>
> /opt/cloud/bin/ vm_dhcp_entry.json
> </script>
> <file>
> /var/cache/cloud/vm_dhcp_entry.json
> {"host_name":"VM-4c5e69ab-65dd-4315-b8fb-702f5599ede0","mac_address":"02:00:0f:22:00:03","ipv4_adress":"","ipv6_duid":"00:03:00:01:02:00:0f:22:00:03","default_gateway":"","default_entry":true,"type":"dhcpentry"}
> </file>
> <script>
> /opt/cloud/bin/ vm_dhcp_entry.json
> </script>
> <file>
> /var/cache/cloud/vm_metadata.json
> {"vm_ip_address":"","vm_metadata":[["userdata","user-data",null],["metadata","service-offering","Tiny
> </file>
> <script>
> /opt/cloud/bin/ vm_metadata.json
> </script>
> <file>
> /var/cache/cloud/vm_metadata.json
> {"vm_ip_address":"","vm_metadata":[["userdata","user-data",null],["metadata","service-offering","Tiny
> </file>
> <script>
> /opt/cloud/bin/ vm_metadata.json
> </script>
> 2015-07-29 05:20:39,132 DEBUG [c.c.h.x.r.CitrixResourceBase] (DirectAgent-402:ctx-83549002)
Executing command in VR: /opt/cloud/bin/ -c /var/cache/cloud/VR-d3b73941-7b3d-489a-bcc6-47c6a777c950.cfg
> Please look for job-115 in the attached MS log file for the sequence of events happened
when we rebooted VPC VR

This message was sent by Atlassian JIRA

View raw message