ivpn / desktop-app

Official IVPN Desktop app
https://www.ivpn.net/apps/
GNU General Public License v3.0
367 stars 50 forks source link

(Linux) Communication is lost when returning from suspend. #143

Open ghost opened 2 years ago

ghost commented 2 years ago

Bug report

Describe your environment

Describe the problem

Steps to reproduce:

  1. Connect.
  2. Suspend.
  3. Resume from Suspend

Observed Results:

Disconnect the VPN once and reconnect to communicate. Unless I reconnect manually, I can't communicate, and the ping won't go through. This problem occurs with both OpenVPN and Wireguard; it cannot be reproduced on Windows.

Expected Results:

Automatic reconnection to VPN upon return from sleep

Relevant Code:

// TODO(you): code here to reproduce the problem
ghost commented 2 years ago

log

[2022-04-22 12:35:03.250] [debug] ==> APIRequest  [73]
[2022-04-22 12:35:03.253] [debug] <== APIResponse [73]
[2022-04-22 12:35:03.254] [warn]  API 'geo-lookup' error: (IPv6) API request failed: unable to access IVPN API server: Get    "https://[2607:5300:203:1735::8]/v4/geo-lookup": dial tcp [2607:5300:203:1735::8]:443: connect: network is unreachable
[2022-04-22 12:35:03.459] [debug] ==> Connect  [74]
[2022-04-22 12:35:03.476] [debug] <== VpnStateResp [0]
[2022-04-22 12:35:03.553] [debug] <== VpnStateResp [0]
[2022-04-22 12:35:03.568] [debug] <== VpnStateResp [0]
[2022-04-22 12:35:05.187] [debug] <== VpnStateResp [0]
[2022-04-22 12:35:06.895] [debug] <== VpnStateResp [0]
[2022-04-22 12:35:06.899] [debug] <== ConnectedResp [0]
[2022-04-22 12:35:06.920] [debug] ==> APIRequest  [75]
[2022-04-22 12:35:06.922] [debug] ==> APIRequest  [76]
[2022-04-22 12:35:06.922] [debug] <== SplitTunnelStatus [0]
[2022-04-22 12:35:06.924] [debug] <== APIResponse [76]
[2022-04-22 12:35:06.924] [warn]  API 'geo-lookup' error: (IPv6) no IPv6 support inside tunnel for current connection
[2022-04-22 12:35:07.894] [debug] <== WiFiCurrentNetworkResp [0]
[2022-04-22 12:35:08.090] [debug] <== APIResponse [75]
[2022-04-22 12:35:08.091] [info]  API: 'geo-lookup' success.
[2022-04-22 12:36:01.224] [debug] <== WiFiCurrentNetworkResp [0]

12:35:08.091 is before suspending. 12:36:01.224 is after coming back from suspend.

stenya commented 2 years ago

I am not able to reproduce the issue on Ubuntu and Manjaro. @gorkapernas Can you, please, check it on Arch Linux?

gorkapernas commented 2 years ago

@stenya tested on Arch Linux XFCE desktop environment and I'm not able to reproduce the issue either, I tried with both OpenVPN and WireGuard and the app always reconnects after coming back from "Suspend".

@maltabeeffishrelish could you please provide us more details? e.g. IVPN settings you were using

ghost commented 2 years ago

I haven't changed any of the settings, even right after installing ivpn and ivpn-ui in trizen, this issue still occurs.

stenya commented 2 years ago

Just to double-check: please, ensure you do not have enabled "Trusted/Untrusted WiFi network control"

ghost commented 2 years ago

It was enabled and has been deactivated. However, the problem still occurs.

stenya commented 2 years ago

@ghost So far, we did not receive any user feedback similar to the issue you reported.

Sometimes OS needs some time to resolve connectivity after wakeup. Try to wait a minute after wakeup and check if connectivity exists.

You can also try to use the OpenVPN protocol. It will start reconnection automatically in situations when connectivity is lost for more than 45 seconds.

It will be helpful for us to receive the IVPN daemon log from you. To do that, please perform the next:

  1. Enable logging: Settings -> General -> Allow logging
  2. Reproduce the issue
  3. Send logs to us: Settings -> General -> Diagnostic logs ...
  4. Disconnect VPN and send logs one more time: Settings -> General -> Diagnostic logs ...

Note: Please, use the latest app version (it is v3.9.32 at the current moment).

ribbybbir commented 1 year ago

Sometimes, the application (for Linux) freezes, thus freezing off both VPN and Internet connections. I think the VPN firewall is still active after the freeze. I have to reboot the computer in order to shake off the broken VPN (firewall) hold on the Internet connection. The only good thing about this error is the consistency of constant VPN connectivity.

I believe that the problem occurred during long period of pause/suspend activity or when I decided to leave the VPN connection on for quite a while. I believe the real problem lies with the VPN location and how they manage things. What we need to do, is to make sure that should the VPN connection breaks/tapers off, the VPN firewall should probably break/taper off as well. Of course, a warning would be welcome. For now, the ever running connect button will serve as an error indicator. If VPN connectivity is still desired, then a list of backup connections would be handy. Then we can worry about the VPN firewall still being up.

ghost commented 1 year ago

I am also encountering this problem. When I return from sleep, it does not automatically reconnect to the VPN. I have to disconnect from the VPN and reconnect manually.

stenya commented 1 year ago

@elvis-hrvat Let us know your OS and version, please.

ghost commented 9 months ago

@elvis-hrvat Let us know your OS and version, please.

I am using Arch Linux. However, I am not currently using IVPN.