<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body smarttemplateinserted="true">
<div id="smartTemplate4-template">
<div style="font-size:10.0pt;font-family:Verdana,Arial"> Hi Jason,
all.<br>
<br>
I have detected some issues with iOS push notifications with WG
while the device is in sleep mode (screen turned off).<br>
<br>
First of all, in spite of having KeepAlive set to 10-30 seconds,
iOS devices don't send keepalive packets at all while the screen
is turned off. The only thing that is more or less always
received on the server is the handshake, every 170 seconds.<br>
<br>
It appears that from time to time WG@iOS is not receiving
communications from the server – the device doesn't respond to
any incoming connections (over the tunnel).<br>
<br>
Due to this, the incoming push notifications don't reach the
device via the tunnel: I see on the server incoming connections
from WhatsApp and Apple servers, the WG@server tries to forward
them to the device, on the underlying iface I see outgoing WG
UDP packets to the client, but no reply from it.<br>
<br>
The device awakes some moment later (probably for the
handshake), WG@iOS communicates with WG@server, iOS establishes
a connection to the APNS and receives the notifications. The
effect is that the notifications enter with a delay (up to 2-3
min) and some incoming calls are lost (i.e. not answered on time
due to lack of notification).<br>
<br>
Also, sometimes iOS devices are trying to connect to 17.0.0.0/8
network (which belongs to Apple and is related to APNS) <i>outside</i>
the tunnel. After this connection fails (due to the firewall not
allowing anything outside VPN), the devices start disconnecting
from the WiFi.<br>
<br>
Any idea why this happens? I know there are issues with iOS
devices entering sleep, this is a huge problem for OpenVPN
Connect app. WG on iOS somehow manages to work during sleep, but
not always. Most (about 80%) of the notifications are received
correctly during sleep, but some fail.<br>
<br>
Regards,<br>
Anatoli<br>
</div>
</div>
</body>
</html>