Posted: Mon Jun 15, 2015 2:28 Post subject: How to Automatically Re-enable VPN
This is my setup
DD-WRT Kong build 27085
OpenVPN through router
Is it possible to automatically re-enable the VPN when it is shut down? Preferably through inputting a line from the command shell or adding a line in the "additional config" in the VPN page.
I have OpenVPN client enabled through the router. It is shown as "client: connected success" when I go to the OpenVPN status page. On ipchicken.com, it shows the VPN IP.
After every hour or so, the VPN would automatically shut down. On the OpenVPN status page, it would show "client: (blank)". I went to ipchicken.com and it showed my real IP.
To fix this, I would go to the VPN page then click on "apply settings". This would re-enable the VPN. The problem is I would have to do this manually each time, and I don't know exactly when the VPN goes down.
Another workaround is to block all internet traffic when the VPN is down, then enable the watchdog to ping an address. When the address is unreachable (due to the blocked traffic when VPN is down), the router automatically restarts, and the VPN is turned on again. My problem with this is I only want to re-enable the VPN, and I don't want to restart the router to do so each time.