A
A
AlizonJohn2017-07-26 13:39:13
openvpn
AlizonJohn, 2017-07-26 13:39:13

How can I make sure OpenVPN restarts automatically when the Internet is disconnected on OpenWRT?

Hello! The situation is this: a tplink 3420 router, an OpenVPN client was desperately needed. I built my OpenWRT firmware, but I had to disable the luci web interface, since OpenVPN did not fit. I set everything up via ssh, the openvpn client works fine.
BUT: openvpn only starts when the router boots! If the connection is interrupted while the router is running, then openvpn does not restart automatically, but simply remains idle. Naturally, there is no Internet access either.
Question: how to set up automatic reconnection of the openvpn client on the router when the connection is broken?
What are the possible solutions? (sorry if this is a dumb question, I'm a newbie)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Sergey, 2017-07-27
@feanor7

Look towards cron, write a script that checks the operation of OpenVPN, if it fails -> restart.
Tyts

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question