1 It seems that openvpn-nossl
installs the init.d script, but it won't work with uci?
2 luci-app-openvpn
installed /etc/config/openvpn
, but there is no cli nor doc for me?
So it's impossible to start a uci openvpn instance from cli?
And btw, how does luci-app-openvpn
get started up? cause there's no init.d script for me...
The LuCI app is for managing the config through LuCI, the OpenWrt GUI.
UCI is used, among other things, to transform OpenWrt-style config files to the form that OpenVPN expects.
You should be able to start the daemon by /etc/init.d/openvpn start
That script will provide hints as to the configuration parameters needed, as would https://openwrt.org/docs/guide-user/services/vpn/openvpn/basic and the related pages.
Edit: I don't agree with everything on that guide, but it does provide insight into the config parameters.
After spending a day or two studying procd scripts,
I finally notice that in /etc/init.d/openvpn
, it will read /etc/config/openvpn
and create syslog and status at /var/run/openvpn.$name.status
.
So,
-
manually edit
/etc/config/openvpn
thenservice openvpn restart
, I recommend addingoption enabled 1
andoption config /etc/openvpn/$name.conf
.
Option enabled is needed otherwise no instance of openvpn will be started and you'll find nothing in syslog.
By usingoption config
, we can use the good familiar openvpn config file, which is kinda crossplatform. -
to check output, use
logread
orlogread -f
to follow. To check status, usecat /var/run/openvpn.$name.status
-
don't use
luci-app-openvpn
, cuz it will overwrite the config file.The config file provides useful comments and examples. Reinstallopenvpn-xxxxx
package to get the config file back if needed.
Unfortunately, none of the above were mentioned in user guide lol
Minimal OpenVPN setup can work using only binary, init-script and /etc/openvpn/*.conf
.
Both luci-app-openvpn
and UCI configuration are optional and required only for instance management.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.