0

I'm having some trouble with my VPN connection. First off, I'm on a Nokia 3.1 running Android 9 and using strongswan for a IKEv2/EAP connection. I've searched the strongswan site front and back and found nothing related to my issue. I've tried to set up an account to post an issue, but for a week now my account says, "waiting for approval by admins." I've searched and read every rfc I can on IKEv2 connections and related topics and learned a lot about it, but nothing specific to my situation. I've also searched my phones configuration files for any interoperability and found nothing. The strongswan app says some phones are not compatible, but they don't give any list as to which are or are not. So that may be an issue as well, but the connection is established so I'm thinking it's not that. I've spoken to my VPN and they have no idea what's going on. So here goes,

As I said, I'm using strongswan for an IKEv2/EAP connection (for some reason IPsec is not available). I use the servers IP, and my credentials to initiate the connection, the server cannot be certificate verified because the available certificate is not a json file. I'm currently trying to find a way to convert the file. But, it settles on a root certificate given to me by my VPN. I'm using aes256gcm16-prfsha384-ecp384 for the connection encryption. I have ca certificates not being sent to the server to reduce IKE AUTH package size. I haven't found any info on an issue there and authentication is completed on both ends. My log says I'm behind NAT, not sure if that makes a difference so I have NAT keep-alive set to 20 seconds. I block IPv4 and IPv6 not destined for the VPN connection. The CHILD SA connection is established with SPI's with support for MOBIKE. The log says

EAP_MSCHAPV2 succeeded MSK established/
Auth of EAP successful/
IKE SA established scheduling Rekeying/
Installing new virtual IP/
CHILD SA Android established with SPI and TS/
Setting up TUN device for CHILD SA Android/
Successfully created TUN device/
Peer supports MOBIKE/

The problem is it's not establishing the connection with the appropriate configurations and about half an hour later my log says:

Creating rekey CHILD SA Android reqid 83/
Create CHILD SA request/
Ignoring KE exchange settled on non PFS proposal/
Inbound CHILD SA established with SPIs/
Outbound CHILD SA established with SPIs and TS/
Sending delete for ESP with CHILD SA and SPI/
Received delete for Child SA/
CHILD SA closed

Traffic ceases after that and due to the kill switch, I lose connection without notification. This happens with every server after a few hours. The new server will work fine but three hours later this happens and continues to happen every half hour after reconnection. What's going on? What have I done wrong? I've tried to communicate all information but there's a lot, if I'm missing anything or you need something specific, please let me know. I've spent about the last three weeks trying to figure this out, having no knowledge of networking before hand. So please excuse me if I've done something wrong or misinterpreted something. I thank you for your time and potential assistance.

Edit 1

The available open config areas are as follows:

•Client Identity •DNS server •MTU of the VPN tunnel device •Server Port •NAT-T keep-alive (set to 20 or connection is lost) •IKEv2 algorithms •IPsec/ESP algorithms •Custom subnets •Excluded subnets

The available toggle on/off options are: •Send all Certificate requests (off to lower packet size) •Use OCSP to check Certificate (on) •Use CRLs to check Certificate (on) •Use strict revocation on checking (off) •Use RSA/PSS signature (on)

The available connection according to the Nord website is supposed to be an IKEv2/IPsec configuration but the only available options in the dropdown menu on strongswan are:

•IKEv2 EAP (Currently selected) •IKEv2 Certificate •IKEv2 Certificate +EAP •IKEv2 EAP-TLS •IKEv2 EAP-TNC

These are only client authorizations though. Is this where the IPsec algorithm configuration line comes into play? Is it not a default? The strongswan documentation for the app states that, "IPsec default proposal limited to AES encryption with SHA1/SHA2 data integrity or AES-GCM auth encryption. Using PFS with one of a number of proposed ECP/MODP DH groups. ChaCha20/Poly1305 also supported. Custom ESP proposal may also be configured."

I have all traffic being routed to the VPN. I have blocked all IPv4 and IPv6 not destined for the VPN. I even changed my APN and stopped all IPv6 traffic. It's been a heck of a ride.

ToxicTech
  • 1
  • 4
  • It seems you are experiencing a _rekeying issue_. A workaround would be to disable rekeying. – Piotr P. Karwasz Feb 22 '20 at 20:34
  • There seems to be no rekeying option on Strongswan. There are however custom configuration areas for IPsec and ESA algorithms. Would that help in some way? I'm supposed to have an IPsec algorithm but I'm using Nord and their servers have been very hard to work with as well as they refuse to give me information regarding the connection or available authentication techniques. So it's a trial and error case, one which I don't have enough experience to tackle. They wanted me to switch to openvpn connect. I would, but the privacy policies and available encryption algorithms are ridiculous, imo. – ToxicTech Feb 23 '20 at 17:23
  • I know certain algorithms allow for Rekeying configuration, as I said my knowledge of the available techniques lacking. Another problem is strongswan puts limitations on the availability of certain protocols and techniques to Android devices. That, added to the lack of information on what the server will accept or work with makes this difficult. I'm currently researching my options, but it's a lot to take in and has been a long process. Not knowing where to find or search for the information I'm looking for, and it not being device specific. Thank you for your advice :) – ToxicTech Feb 23 '20 at 17:29
  • Edit, ESP proposal algorithms, not ESA, my apologies. – ToxicTech Feb 23 '20 at 17:31
  • A couple of options in `ipsec.conf` or `swanctl.conf` regulate rekeying: cf. [Expiry and replacement of SAs](https://wiki.strongswan.org/projects/strongswan/wiki/ExpiryRekey). Can you add to the question what kind of configuration options do you have in your Android app? – Piotr P. Karwasz Feb 23 '20 at 21:10
  • @PiotrP.Karwasz Thanks for the link, I had not found that page before. I didn't want to post an answer, but the comments section only allowed so many characters. – ToxicTech Feb 24 '20 at 02:47
  • You can edit the question instead of posting an answer. Since the app gives you a limited amount of logging information, you should probably ask on StrongSwan forums in order to debug the rekeying issue. – Piotr P. Karwasz Feb 24 '20 at 05:19
  • It will probably be difficult to analyze this without help from the server admins. However, since they apparently don't expect DH groups during ESP rekeying (third line in the second log excerpt), you might want to simplify the ESP proposal (if you configured one yourself). Maybe the server has a problem with that. Posting the actual client logs might also help (shows which SAs are rekeyed/closed and what happens afterwards). – ecdsa Feb 24 '20 at 10:24
  • @ecdsa i'll get to work on posting a log right now. I have not configured any new proposals out of fear of losing connection. I'm currently researching the available configurations, with so much to learn, it's a slow process. Any suggestions on the ESP / IPsec configuration? Any suggestions on available documentation considering all aspects is also welcomed. Its tough to search for exact rfc's, or ones that pertain to my exact situation. Thanks – ToxicTech Feb 24 '20 at 15:52
  • Upon editing the log I realized the server was giving me the information on the algorithms it will accept. Now, I have to cross reference compatibility with the app and see if that helps. I still need assistance though, this isn't a definite answer to the question. I believe. I will keep all progress posted. – ToxicTech Feb 24 '20 at 17:32
  • Wow, I did not realize how many rfc's I would have to read to implement IPsec into a KE running behind NAT. I started with 12, I can't count how many I've read now. Wish I was paid to do this. On top of having to read extra rfc's to explain the servers requests. Ill be a pro in no time. I need to do it quickly though. I have to rekey every half an hour right now and the more you do it with a default setting, the less secure it becomes. I had no idea, I should have just used Linux, although the implementation is still the same. – ToxicTech Feb 25 '20 at 09:39
  • I gave up on posting the logs, even after editing them. Upon further reading I realized that a lot of secure implementation information would be at risk, a risk I cannot take. – ToxicTech Feb 25 '20 at 09:42
  • OK, so I fixed the rekeying issue, and have created a new one. The SA is established with the purposed algorithms. Upon rekeying, the algorithm's are denied and subsequently returns to a simple IKE. What have I done wrong? – ToxicTech Feb 26 '20 at 06:06

0 Answers0