hwdsl2 / setup-ipsec-vpn

Scripts to build your own IPsec VPN server, with IPsec/L2TP, Cisco IPsec and IKEv2
Other
25.25k stars 6.32k forks source link

2 simultaneous connections #1367

Closed alexpotbitweb closed 1 year ago

alexpotbitweb commented 1 year ago

Hello! Thank you for the work done, the script really simplifies the work and launch of servers. I have a problem that I don't know how to solve. The situation is as follows

  1. I create 2 accounts through the ikev2.sh script
  2. I import the received profiles into android and into windows pc
  3. I try to connect, the connection occurs on both devices
  4. but data exchange (opening sites, etc.) occurs only on the device that connected last.

Server OS Centos 7 Android 13 client - strongswan Windows 10 client - native (im using ikev2_config_import.cmd)

please help with a solution

hwdsl2 commented 1 year ago

@alexpotbitweb Hello! The issue you described is probably because the second connection replaced the first one. This normally should not happen unless you are using the same IKEv2 certificate on both clients.

First make sure that the IKEv2 profiles you imported to Android and Windows contain unique certificates. It looks like you already done this step but please double check. Create a new IKEv2 client and import again if you are unsure.

Also check and make sure your /etc/ipsec.conf contains uniqueids=no. This is the default config in the scripts.

Restart the IPsec service using "sudo service ipsec restart".

You can also try switching the order of connection for Android and Windows.