I recently bought a GL.iNet MT300N-v2 router and discover OpenWrt 18.06.1.
First : I am impressed by the quality and detail of this OS information. Good job.
I set parameters to be able to connect a VPN client. Easy and great.
Now, I would like to connect automatically this tunnel after the router booted.
(I checked the VPN client service is started at boot)
I saw, in the Luci admin pages, a chapter about "Scheduled Tasks".
I think it is here that I could add some order, but I Don't know which language it use and the way to "connect the VPN client I named 'my_VPN'".
Thanks for help.
What protocol is the vpn? OpenVPN, Wireguard, or something else? I use the first two and they automatically come up on boot.
I use OpenVPN client.
(some minutes later)
I'm an idiot: In fact, the router memorizes the Connected / Disconnected state and, indeed, if it was connected before the reboot, it reconnects itself to the boot.
Sometimes, I do not know what I think …
Many thanks, Trendy
*/1 * * * * sed -i '/secret/d' /tmp/etc/openvpn-xxxxxxxxxxxxx.conf
you meant that?!
Place your vpn connection name instead xxxxxxxxxxxxx.conf
*/1 * * * * sed -i '/secret/d' /tmp/etc/openvpn-my_VPN.conf
The standard behaviour of the OS is enough for my use.
Thanks for having documented the way to do what I asked first.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.