[Solved] Automatically reset OVPN Client when disconnected

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking
Author Message
boris03
DD-WRT User


Joined: 17 Jan 2019
Posts: 127

PostPosted: Mon Nov 04, 2019 17:34    Post subject: [Solved] Automatically reset OVPN Client when disconnected Reply with quote
There is one thing when using the VPN Client in DD-WRT is annoying and I am sure I am not allone and I am also sure that there are solutions already available.

The annoying thing is that sometimes after days but more often already after hours the OVPN client is disconnected. For what ever reason maybe the VPN provider ... currently I am using Cyberghost.

Today when I in the Web GUI switch OFF the client and switch ON it reconnects.
Is there a solution for it to perform e.g. an automatic restart for the OVPN client when connection is lost.

Background: When i PBR the enigma SAT receiver to use the OVPN client and the client is down I don´t have a working internet connection and so the WAF is 0% Smile


Last edited by boris03 on Wed Nov 06, 2019 17:01; edited 1 time in total
Sponsor
d0ug
DD-WRT Guru


Joined: 31 Jul 2015
Posts: 771

PostPosted: Mon Nov 04, 2019 23:02    Post subject: Reply with quote
The easiest method i've found is to go into the admin tab, then keep alive and setup the connection watchdog. Set it to ping some site that would rarely ever have outages. I use google's DNS 8.8.8.8. Choose some reasonable interval for it to ping and also make sure you have a VPN killswitch enabled so the pings dont route out around the tunnel when it is down. After the VPN drops and the watchdog cant ping the configured host, it will simply reboot the router.
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 4332
Location: Netherlands

PostPosted: Tue Nov 05, 2019 9:32    Post subject: Reply with quote
Not sure if the keep alive watchdog works as the OP is using PBR (the watchdog might ping via the WAN)

You have to ping via the openvpn TUN1 interface.

In the third post of the PBR guide is a link to a OVPN watchdog script, have a look there:
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686

_________________
Routers:Netgear R7800, Netgear R6400v1, Netgear R6400v2, Linksys EA6900 (XvortexCFE), Linksys E2000 (converted WRT320N), WRT54GS v1.
Install guide Linksys EA6900: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=291230
OpenVPN Policy Based Routing guide: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Install guide R6400v2:http://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
OpenVPN Server Setup:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=318795
Install guide R7800: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Wireguard Setup guide:https://forum.dd-wrt.com/phpBB2/viewtopic.php?p=1183135
boris03
DD-WRT User


Joined: 17 Jan 2019
Posts: 127

PostPosted: Wed Nov 06, 2019 17:02    Post subject: Reply with quote
For the solution please follow

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321686
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Advanced Networking All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum