How to autostart OpenVPN client on boot?


I'm currently on OpenWrt 21.02.1 r16325-88151b8303.

I followed this tutorial for setting up the OpenVPN client:

But I can't get the tunnel to automatically mount on startup. I am systematically obliged to go to: A.B.C.D./cgi-bin/luci/admin/vpn/openvpn and click on "Start" corresponding to my OpenVPN instance.

Then I have to go to A.B.C.D./cgi-bin/luci/admin/network/diagnostics: to ping my remote LAN via the Network Utilities to pass some packets otherwise, despite the connection being OK, no packet passes .

I'm sure the solution is quite simple but I didn't find my happiness in the documentation.

Thanks for your help.

To autostart on boot you need to issue "/etc/init.d/openvpn enable". Haven't check the tutorial in the link but the you need to have everything configured in "/etc/config/openvpn" as another prerequisite

Thank you maurer for your simple and effective answer. I applied your command line and I rebooted and "voila" my tunnel was mounted after the reboot !


1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.