I’d like to find a way to properly install a new ovpn client configuration via ssh (I need to do many and would like to script this as a part of device setup).
I’ve copied the .ovpn file, added lines to set script-security 2 and run update-resolv-conf on up/down, and I’ve added entries to /etc/config/ovpnclients as well as /etc/config/glconfig to point at the correct file.
But I think i’m missing where these configurations are stored. The VPN connection can be successfully made, but I’ve been seeing some strange things when the link is interrupted (e.g. can’t disconnect/reconnect in the gui, up/down script not firing correctly, routes and iptables rules not being applied as a result).
Is there a way for me to properly add an ovpn client config without using the web GUI?