Page 1 of 2

connection stop communicating after call

Posted: Mon May 31, 2021 8:18 am
by lucidnx
Hello! I have set up Wireguard always on VPN (split tunnel) to my server, and I am facing 1 issue. When I make a call, connection somewhat stop working. App is showing "Connected" but data could not get trough, other side is not even responding to ping. My question is, can you add something like ping-check or something more "useful" to keep connection active? maybe "after call reset if on mobile data" or something like that..?

(and +1 on adding pptp, l2tp) it would be really nice to have all tunnels in 1 app, instead of in android settings not even backed up.

Re: connection stop communicating after call

Posted: Mon May 31, 2021 1:09 pm
by admin
Hello,
this happens because the device and/or the mobile phone carrier do not allow the use of mobile data while using the voice call.
Please try to follow these steps:
  • start the app
  • tap on top left icon
  • tap on "Global options"
  • tap on "VPN options"
  • select "Restart WireGuard connection when connectivity chage"
  • save the changes
  • restart the VPN
Thank you for the suggestions. For the moment these protocols alre not scheduled, maybe in the future...

Re: connection stop communicating after call

Posted: Wed Jun 02, 2021 12:31 pm
by lucidnx
Thanks for reply. I have restart enabled, but now there is another problem mostly caused by peer set to name not IP. If you change network, it immedialy try to resolve domain name but no DNS/network is available in that short time even on fast reliable devices, and that cause infinite "Connecting" state. If i set IP address instead of name to endpoint IP, it work as expected. maybe some delay or wait for network option can solve that.

Re: connection stop communicating after call

Posted: Wed Jun 02, 2021 1:12 pm
by admin
This happens because the VPN is configured to redirect all packets to the VPN.

Please try to follow these steps:
  • edit the VPN profile
  • tap on "App filter"
  • set "App filter mode" to "The vpn can be used by any apps, except for the following apps"
  • tap on "+" button and add the "VPN Client Pro" app to the list
  • save the changes

Re: connection stop communicating after call

Posted: Wed Jun 02, 2021 3:24 pm
by lucidnx
just tried, it don't work.. can you add connection timeout and retry? maybe 30s or customizable? I can provide logs tomorrow if needed, we have unstable DSL in work and it is somewhat dropping connection every few minutes, that ends always in "connecting" state forever.

Re: connection stop communicating after call

Posted: Wed Jun 02, 2021 4:43 pm
by admin
The app is already designed to try to connect again.
Maybe the hostname is registered with a dynamic DNS and so it could change.
Have you tried to selected the "Resolve hostname before reconnecting" option in the Peers section?

Yes, the VPN log would be useful...

Re: connection stop communicating after call

Posted: Wed Jun 02, 2021 7:34 pm
by lucidnx
Yes, I have checked "resolved hostname" all the time.
my setup is:
static IP let's call it 1.1.1.1 on mikrotik router, from there is dst-nat to another mikrotik inside my network (192.168.0.50/24) with wireguard (192.168.1.1/24).
Port 13231
MTU 1420
peer allowed IP's 0.0.0.0/0
keepalive 25s

on another side galaxy note 20 ultra, client config:
restart WG on connectivity change
auto connect set to connect & disconnect on UP/Down for mobile network, wifi, wimax (except my local wifi to avoid issues)
192.168.1.100/24
MTU 1420
keepalive 25s
DNS set to server inside my network
DNS suffix set to my domain
peer set to hostname with port 13231
reaolve hostname checked
allowed IP's including 192.168.1.0/24, 192.168.0.0/24

this works almost good enough but when it comes to bad connectivity, it is "connecting" almost always, but when I stop it and start manually, it immedialy connect again.
when I change peer to IP address, it works OK, but I can see frequent restarts, it keep connection for ~6-15 minutes and then reconnect successfully (no network change, wifi working properly, just uptime is reset)
as I mentioned, I will paste logs tomorrow, maybe it does have something with not best modem from ISP.

Re: connection stop communicating after call

Posted: Thu Jun 03, 2021 10:21 am
by lucidnx
hmm.. today it started dropping connection even on IP, definitely network issue
in log there are handshake timeouts after some time since connected, until I stop/pause connection and restart it. then it work for few minutes again.

log:
send handshake
handshake completed
connected
.
.
.
random time later:
Peer handshake timeout
Send handshake
Peer handshake timeout
....infinite until manual restart

Re: connection stop communicating after call

Posted: Thu Jun 03, 2021 10:38 am
by admin
Yes, the problem should be on the connectivity or on the server side.
Mikrotik's WireGuard implementation is still in beta, so maybe the problem is on the router...

Re: connection stop communicating after call

Posted: Thu Jun 03, 2021 11:00 am
by lucidnx
Server side is working fine, over LTE/NR network it stay connected for much longer, and can reconnect itself if it fail.. Maybe firewall is closing session and require keepalive time shorter than 25s :idea: