Posted: Fri May 18, 2018 17:20 Post subject: PIA OpenVPN client drops and doesn't reconnect
Firmware: DD-WRT v3.0-r35550M kongac
I've noticed that my OpenVPN client connection to PIA is dropping and not reconnecting after seemingly inconsistent times. Sometimes after a day, a week, 20 days etc.
Running the service command gets things going again:
Code:
stopservice openvpn && startservice openvpn
This started happening around 6 months ago in newer builds, but I'm mindful this might not be anything related to DD-WRT.
This is my OpenVPN conf with all the merged NVRAM fields
Yes, I have seen this. It seems to be router-specific on the same build. An EA8500 does not drop and an R8000 does. The more recent firmware seems to have resolved it (on r35900m I have not seen it since release).
I also notice on startup the ea8500 connects but the r8000 does not and needs a service restart. That seems to be something to do with ntp initial update of the time, as the vpn connection does not work if the time has not been set yet.
I've just updated to the latest TEST Kong build and I'll see how I go.
It's something I've been meaning to get around to.
Another problem I've found is my split tunnel stuff also gets wiped out by OpenVPN when it restarts (I assume this is due to the route-down/up script). I believe I've been able to solve that by adding a custom up script so all of the ip route stuff is executed each time the VPN comes back up.
Thanks,
James _________________ James
Main router:
Netgear R7000 overclocked to 1.2GHz - DD-WRT v3.0-r35965M kongac
IPv6 6in4 (HE.net), OpenVPN (with PBR and split tunnelling), Entware, dnsmasq with ipset
I had the same issue, with PIA for some time till I came up with a solution to this issue for good, since then there are no issue!
Solution!
Is simple, login into the DD-WRT router, open the Administration tab, under Management tab, scroll down to section “Additional Cron Jobs”, in this section put the Cron job, without the quotes on a single line. So from here on out the VPN services will restart at 5am every morning. This is what solved the dropping and reconnect issue.
That's a good idea. So far after updating I haven't experienced the issue since, but having a cronjob restart the openservice regularly is a good idea if this does keep happening.
I think I did try that once, but tried to make it a little more aware by checking if the OpenVPN process was running. What I found however was when the OpenVPN service did go down in this way it was still reporting some weird process state so the stopservice/startservice never happened.
I guess making it more simpler and forcing it to restart out of hours regardless is probably the better option.
Thanks, _________________ James
Main router:
Netgear R7000 overclocked to 1.2GHz - DD-WRT v3.0-r35965M kongac
IPv6 6in4 (HE.net), OpenVPN (with PBR and split tunnelling), Entware, dnsmasq with ipset
The reason it works, is the cron job, the 30 sec delay, is for a clean disconnection from your VPN provider, secondly it allow the router to clean itself up, and lastly to have a clean connection to the VPN services, this cron job has been running 12 months without issue, no disconnect, or dropout even after all this, since I have an app that tell me my router new VPN address every 24hrs.
If your still having issue, reboot the router, this help solve's 90% of all problems.
Cheers