OpenVPN cannot start automatically after a reboot

I have a GL-MT300N-V2, and every time I reboot or switch off my minirouter OpenVPN can’t start, I need to enter settings and click “apply” to start it.
These are some errors I can find:
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: [CyberGhost VPN Server Node milano-s03] Inactivity timeout (–ping-exit), exiting
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: TCP/UDP: Closing socket
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: /sbin/ip route del X.X.X.X/X
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: /sbin/ip route del X.X.X.X/X
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: /sbin/ip route del X.X.X.X/X
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: /sbin/ip route del X.X.X.X/X
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: Closing TUN/TAP interface
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: /sbin/ip addr del dev tun0 local X.X.X.X peer X.X.X.X
Sun Dec 2 17:12:32 2018 daemon.notice netifd: Network device ‘tun0’ link is down
Sun Dec 2 17:12:32 2018 daemon.notice netifd: Interface ‘VPN_client’ has link connectivity loss
Sun Dec 2 17:12:32 2018 daemon.notice netifd: Interface ‘VPN_client’ is now down
Sun Dec 2 17:12:32 2018 daemon.notice openvpn[2573]: SIGTERM[soft,ping-exit] received, process exiting

Can someone help me please?

Did you configure the switch function to trigger OpenVPN?

Seems there is a ping exit option in the ovpn and it exit because of this.

Can you please post the content of your CyberGhost ovpn? Their ovpn need to be generated from user portal.

You can remove your credentials

Do you mean the “bring up on boot” option? Yes already done… OpenVPN try to start but find an issue and stop…

This is the content of my cyberghost ovpn file:

client
remote 1-it.cg-dialup.net 443
dev tun
proto udp
auth-user-pass

resolv-retry infinite
redirect-gateway def1
persist-key
persist-tun
nobind
cipher AES-256-CBC
auth SHA256
ping 5
ping-exit 60
ping-timer-rem
explicit-exit-notify 2
script-security 2
remote-cert-tls server
route-delay 5
tun-mtu 1500
fragment 1300
mssfix 1300
verb 4
comp-lzo

ca ca.crt

cert client.crt

key client.key

Remove the following command and reupload the file. You can also edit directly on the router

ping-exit 60
1 Like

It works! Thank you very much! Problem solved :smile: