# Openvpn reconnect script

**URL:** <https://forum.gl-inet.com/t/openvpn-reconnect-script/3179>\
**Category:** Router\
**Created:** [March 26, 2018, 2:44am UTC](https://forum.gl-inet.com/t/openvpn-reconnect-script/3179 "2018-03-26T02:44:50Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![glitch](https://forum-assets.gl-inet.com/letter_avatar_proxy/v4/letter/g/0ea827/32.png) [@glitch](https://forum.gl-inet.com/u/glitch)\
**Post date:** [April 5, 2018, 7:34pm UTC](https://forum.gl-inet.com/t/openvpn-reconnect-script/3179/10 "2018-04-05T19:34:11Z")

</div>

The problem is the connection gets “stuck” even though the VPN still appears connected.

I use a ping script from this thread:

> [@OpenVPN Periodic Disconnection](https://forum.gl-inet.com/t/openvpn-periodic-disconnection/2296):
>
> When I connect to a NordVPN TCP profile, after a while (never more than an hour) it disconnects. I can see in glconfig file and the GLI UI that force and enabled are still on, but that it shows status as ‘non started’. But the log on the GLI UI shows: /usr/sbin/ip route del 0.0.0.0/1 /usr/sbin/ip route del 128.0.0.0/1 Closing TUN/TAP interface /usr/sbin/ip addr del dev tun0 10.7.7.32/24 SIGTERM[soft,auth-failure] received, process exiting … I wanted to create a script that automatically hit…

You can use the script and/or first try making the changes in the ovpn file.

---

_[View the full topic](https://forum.gl-inet.com/t/openvpn-reconnect-script/3179)._
