StrongSwan with several rightsubnet's - ikev1
ISSUE TYPE
- Bug Report
COMPONENT NAME
VR
StrongSwan
CLOUDSTACK VERSION
ACS 4.11.2.0
CONFIGURATION
Advanced Network VPC
OS / ENVIRONMENT
SUMMARY
After upgrading ACS from 4.9.3 (openswan) to 4.11.2 (strongswan), all VPNs with multiple networks have stopped working. Only one of the networks declared in the encryption domain passed traffic.
rightsubnet=192.168.198.0/23,192.168.208.0/23,192.168.170.0/23,192.168.234.0/23,192.168.69.0/24
I changed the configuration manually by creating different Child SAs, one for each network, now all networks work. https://lists.strongswan.org/pipermail/users/2015-November/008966.html
Example: #conn for vpn-4.3.2.1 conn vpn-4.3.2.1 left=1.2.3.4 leftsubnet=192.168.101.0/24 right=4.3.2.1 type=tunnel authby=secret keyexchange=ike ike=aes128-sha1-modp1024 ikelifetime=1h esp=aes128-sha1-modp1024 lifetime=8h keyingtries=2 auto=start forceencaps=no dpddelay=30 dpdtimeout=120 dpdaction=restart
conn net-192.168.198.0 also=vpn-4.3.2.1 rightsubnet=192.168.198.0/23 auto=start
conn net-192.168.208.0 also=vpn-4.3.2.1 rightsubnet=192.168.208.0/23 auto=start
conn net-192.168.170.0 also=vpn-4.3.2.1 rightsubnet=192.168.170.0/23 auto=start
conn net-192.168.234.0 also=vpn-4.3.2.1 rightsubnet=192.168.234.0/23 auto=start
conn net-192.168.69.0 also=vpn-4.3.2.1 rightsubnet=192.168.69.0/24 auto=start
From internal exchanges with @dudarra , I understand that there are a few technical limitations and peculiarities that VPN users should be aware of. So, it may make sense to improve the documentation, API and/or UI related to VPN configuration.
In particular, the available cipher suites seem to be outdated and not in line with best cryptographic practices. MD5, SHA1? These hashing algorithms are considered broken by the cryptographic community. Why does CloudStack not offer SHA256, SHA348 and SHA512? Also, why aren't there any other Diffie-Hellman groups offered besides 1, 2 and 5? Why is there no option to enable CTR or GCM AES block cipher modes?
@onitake - since this is a community thing, I would suggest you get involved as much as possible, and therefore I suggest you:
- create a PR for updating documentation, as per the explanations above - it will be very valuable
- create a new Issues (improvement) with enough explanation on WHAT and WHY some ciphers should be changed.
I'll pay a beer in Zurich for whoever updates the docs :)
All right, fair enough. 'll compare the list of cipher suites that StrongSwan 5.5 supports versus the ones that the are configured in the CloudStack UI. A PR may have to wait until I get more familiar with the code base.
I believe that just documenting the current IKEv2 thing would be of great value (PR to the doc repo - that is very simple) For the ciphers change/addition - I guess just the issue would be enough, so we can discuss what options make sense.
thx
On Fri, 24 May 2019 at 22:03, Gregor Riepl [email protected] wrote:
All right, fair enough. 'll compare the list of cipher suites that StrongSwan 5.5 supports versus the ones that the are configured in the CloudStack UI. A PR may have to wait until I get more familiar with the code base.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/apache/cloudstack/issues/3138?email_source=notifications&email_token=ACMABEEYTBOMYUI45EJUURTPXBCXXA5CNFSM4GRCB3BKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWGODIY#issuecomment-495772067, or mute the thread https://github.com/notifications/unsubscribe-auth/ACMABECO5LOOFNORINULK5LPXBCXXANCNFSM4GRCB3BA .
--
Andrija Panić
If I read this right, the UI presents the following cipher suites (according to https://github.com/apache/cloudstack/blob/4.11.2.0/ui/scripts/network.js#L5884-L6078 ):
- IKE.encryption, ESP.encryption
- aes128
- aes192
- aes256
- 3des
- IKE.hash, ESP.hash
- sha1
- sha256
- sha384
- sha512
- md5
- IKE.DH, perfect.forward.secrecy
- modp1536 (group 5)
- modp2048 (group 14)
- modp3072 (group 15)
- modp4096 (group 16)
- modp6144 (group 17)
- modp8192 (group 18)
- modp1024 (group 2)
It seems like I misunderstood @dudarra , and the issue lies with the Riverbed appliance?
StrongSwan can support more ciphers though, provided that the appropriate plugins are installed: https://wiki.strongswan.org/projects/strongswan/wiki/IKEv2CipherSuites
As for updating the documentation, I'll give it a shot.
That's correct, yes. Some old ones are kept for compatibility reasons I assume.
Please send a doc PR, thanks. https://github.com/apache/cloudstack-documentation
FYI, we upgrade from 4.9.3 to 4.11.3 and ran into this issue with BOTH ikev1 and ikev2 site-to-site VPNs. The other sides were Cisco ASA firewalls. We also seem to have the problem with Cisco Meraki firewalls connecting to Cloudstack. It's been a huge pain - manually editing ipsec conf files now to break out the rightsubnets
@ggoodrich-ipp could you upload a PR to address this? We have had this fixed in our environment for a while now.
hi there am trying to configure site to site vpn tunnel from my centos 7 cloud server to my Cisco asa device by using Strongswan but am keep getting this output someone help me am stuck here for weeks
root@imart-linux ibragullam]# strongswan statusall
Status of IKE charon daemon (strongSwan 5.7.2, Linux 3.10.0-1127.13.1.el7.x86_64, x86_64):
uptime: 3 hours, since Jul 05 13:02:21 2020
malloc: sbrk 1724416, mmap 0, used 625376, free 1099040
worker threads: 11 of 16 idle, 5/0/0/0 working, job queue: 0/0/0/0, scheduled: 19
loaded plugins: charon pkcs11 tpm aesni aes des rc2 sha2 sha1 md4 md5 mgf1 random nonce x509 revocation constrain
ts acert pubkey pkcs1 pkcs7 pkcs8 pkcs12 pgp dnskey sshkey pem openssl gcrypt fips-prf gmp curve25519 chapoly xcbc
cmac hmac ctr ccm gcm curl attr kernel-netlink resolve socket-default farp stroke vici updown eap-identity eap-sim
eap-aka eap-aka-3gpp eap-aka-3gpp2 eap-md5 eap-gtc eap-mschapv2 eap-dynamic eap-radius eap-tls eap-ttls eap-peap xa
uth-generic xauth-eap xauth-pam xauth-noauth dhcp led duplicheck unity counters
Listening IP addresses:
10.128.0.8
Connections:
imart-to-ASA5500: %any...41.204.128.170 IKEv1, dpddelay=300s
imart-to-ASA5500: local: [34.71.172.92] uses pre-shared key authentication
imart-to-ASA5500: remote: [41.204.128.170] uses pre-shared key authentication
imart-to-ASA5500: child: 10.128.0.8/32 === dynamic TUNNEL, dpdaction=clear
add_ASA5500_sub0: %any...41.204.152.238 IKEv1, dpddelay=300s
add_ASA5500_sub0: local: [34.71.172.92] uses pre-shared key authentication
add_ASA5500_sub0: remote: [41.204.152.238] uses pre-shared key authentication
add_ASA5500_sub0: child: 10.128.0.8/32 === 41.204.152.238/32[0/10501] TUNNEL, dpdaction=clear
add_ASA5500_sub1: %any...41.204.152.232 IKEv1, dpddelay=300s
add_ASA5500_sub1: local: [34.71.172.92] uses pre-shared key authentication
add_ASA5500_sub1: remote: [41.204.152.232] uses pre-shared key authentication
add_ASA5500_sub1: child: 10.128.0.8/32 === 41.204.152.232/32[0/vcom-tunnel] TUNNEL, dpdaction=clear
Security Associations (1 up, 2 connecting):
imart-to-ASA5500[667]: ESTABLISHED 14 seconds ago, 10.128.0.8[34.71.172.92]...41.204.128.170[41.204.128.170]
imart-to-ASA5500[667]: IKEv1 SPIs: 1ac345a770ba5de9_i* 0711bd6acb769aea_r, rekeying disabled
imart-to-ASA5500[667]: IKE proposal: AES_CBC_256/HMAC_SHA1_96/PRF_HMAC_SHA1/MODP_1024
imart-to-ASA5500[667]: Tasks queued: QUICK_MODE ISAKMP_DPD
imart-to-ASA5500[667]: Tasks active: MODE_CONFIG
add_ASA5500_sub1[3]: CONNECTING, 10.128.0.8[%any]...41.204.152.232[%any]
add_ASA5500_sub1[3]: IKEv1 SPIs: e8ee158c44b97ca0_i* 0000000000000000_r
add_ASA5500_sub1[3]: Tasks queued: QUICK_MODE
add_ASA5500_sub1[3]: Tasks active: ISAKMP_VENDOR ISAKMP_CERT_PRE MAIN_MODE ISAKMP_CERT_POST ISAKMP_NATD
add_ASA5500_sub0[2]: CONNECTING, 10.128.0.8[%any]...41.204.152.238[%any]
add_ASA5500_sub0[2]: IKEv1 SPIs: a95e5608ea7ba613_i* 0000000000000000_r
add_ASA5500_sub0[2]: Tasks queued: QUICK_MODE
add_ASA5500_sub0[2]: Tasks active: ISAKMP_VENDOR ISAKMP_CERT_PRE MAIN_MODE ISAKMP_CERT_POST ISAKMP_NATD
it seems that Cisco ASA does not support multiple connections per CHILD_SA, so a comma separated list of right subnets would not work, and a separate CHILD_SA for each connection (right subnet) is needed, as in the begining of the this thread - this PR looks good https://github.com/apache/cloudstack/pull/4137
@mlimalotic @andrijapanicsb @onitake @Slair1 can this be closed? The 4.15 systemvmtemplate will ship latest strongswan.
@rhtyd in general yes, but there is a PR that additionally enhances and let one choose if they want separate connections per shild SA/ike v1, v2, or just ike - https://github.com/apache/cloudstack/pull/4137
Improved and fixed by https://github.com/apache/cloudstack/pull/4953