Openvpn script restart and auto connect

Hello to all.

I am happy with Nordvpn but I have a problem. Every few hours (I don’t know exactly) openvpn stops working and I read:

“openvpn not started”

So I have to start openvpn again or I have to reboot the router completely to make nordvpn go. So…

  • Is there a way to get openvpn started if it stops working?
  • Is there a way to reconnect to the nordvpn server automatically?

As soon as I can I write the firmware that mounts. The model is GL-MT300N-V2


1 Like
ubus call system board
opkg list-installed openvpn\*
ls -l /etc/rc.d/*openvpn

Thanks tomorrow I try to follow the line

What is this?

This is in case you want to diagnose the problem.

ubus call system board

        "kernel": "4.4.92",
        "hostname": "GL-MT300N-V2",
        "system": "MediaTek MT7628AN ver:1 eco:2",
        "model": "GL-MT300N-V2",
        "board_name": "gl-mt300n-v2",
        "release": {
                "distribution": "LEDE",
                "version": "17.01.4",
                "revision": "r3560-79f57e422d",
                "codename": "reboot",
                "target": "ramips\/mt7628",
                "description": "LEDE Reboot 17.01.4 r3560-79f57e422d"

 opkg list-installed openvpn\*
openvpn-openssl - 2.4.3-2
ls -l /etc/rc.d/*openvpn
ls: /etc/rc.d/*openvpn: No such file or directory

You need to enable the service autostart:

/etc/init.d/openvpn enable
ls -l /etc/rc.d/*openvpn
/etc/init.d/openvpn restart

Thanks a lot.

I will do this as soon as possible. You think that I don't even have to get the script of the auto connection?

It's ok? if I turn off the router and turn it back on do I have to do this? Thanks

root@GL-MT300N-V2:~# /etc/init.d/openvpn enable
root@GL-MT300N-V2:~# ls -l /etc/rc.d/*openvpn
lrwxrwxrwx    1 root     root            17 Sep 17 13:32 /etc/rc.d/K10openvpn -> ../init.d/openvpn
lrwxrwxrwx    1 root     root            17 Sep 17 13:32 /etc/rc.d/S90openvpn -> ../init.d/openvpn
root@GL-MT300N-V2:~# /etc/init.d/openvpn restart

The run with enable places the links in rc.d. This should cause the service to auto start on boot.

1 Like

I followed the nordvpn guide perfectly but it doesn't connect. Maybe I have an older version of openwrt. So I reset everything and turned back. Now it's fine, I add the auto restart script, now I have to add the auto connection script. It's possible? Thanks