hwdsl2/setup-ipsec-vpn

OpenVPN overs IKEv2 slow

Vincz opened this issue · 1 comments

I'm using the script to configure a VPN on a VPS server and it's working well.
I can connect without problem to the VPN and navigate at almost full speed of my VPS network: ~45Mo/sec.
I also have a OpenVPN client to connect to a company network. And when I connect to it directly, I get around ~20Mo/sec.
But if I used both at the same time (I use the OpenVPN client inside the IKEv2 one), it works, but the bandwith drop to 2Mo/sec.

I checked the log and get sometimes error like this:
udp_xmit failed to xxx:xx with err=-1:Resource temporarily unavailable

Could it be related? Is there any way I could debug or monitor this issue? Or is there options I could play with to try to improve the speed?

@Vincz Hello! For your use case, using nested VPNs (such as OpenVPN inside IKEv2) could indeed cause significant bandwidth reduction. This is normal and could be caused by the encryption overhead of both VPNs, TCP congestion control ineffective for traffic inside a nested VPN (reference), among other reasons. Unfortunately, I don't know an easy way to debug that. It is recommended to use one VPN protocol, instead of a nested VPN setup.