VPN losing Connection

I have a sangoma s500 at a remote location that loses its VPN connection and subsequently SIP registration a few minutes after the phone is rebooted. Is there a way to get a more verbose log than what is present in /var/log/messages? Is there any information available on how frequently the phone re-attempts the VPN connection if/when the VPN connection drops?

FreePBX 13.0.191.11
Asterisk 13.9.1
OpenVPN 2.3.7

Run this command

nohup tcpdump -i eth0 -n -s 0 -vvv -w /var/log/tcpdump-20170510.pcap &

Replace eth0 with the ethernet device that your box uses.
nohup will make the tcpdump command to detach from the ssh connection and the & will send it to background. Let it run there and when the problem occurs and you want to stop it run the following command

ps aux | grep tcpdump

see what is the process number and then run

kill -9 processnumber

to stop the command. Then in your /var/log directory the tcpdump file will have all the packets that the eth0 device got during all this time.

Open it with wireshark and try to debug from there.

I’ll perform the packet capture today. From looking at the logs it appears that the VPN client on the phone never attempts to reconnect. When the phone detects that the VPN is no longer connected how often and how many times should it attempt to re-connect?

It only tries connecting at boot at this time. Feel free to open a feature request at issues.freepbx.org under the phone project.

Is there any way from the interface on the phone to have the end user re-connect to the VPN?

no it only connects at this time on boot

Thanks. Feature enhancement created https://issues.freepbx.org/browse/TELE-560

sounds good. we will communicate with you through the ticket as it works its way through the queue