Hi all,
Background: On my TP-Link TL-WR1043N/ND v1 running OpenWrt Barrier Breaker 14.07 / LuCI Trunk (0.12+svn-r10530), I have just configured a simple VPN server by following the guide at http://wiki.openwrt.org/doc/howto/vpn.openvpn .
root@RavelRouter:~# openvpn --version
OpenVPN 2.3.6 mips-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [MH] [IPv6] built on Jan 6 2015
library versions: OpenSSL 1.0.2a 19 Mar 2015, LZO 2.08
Originally developed by James Yonan
Copyright (C) 2002-2010 OpenVPN Technologies, Inc. <sales@openvpn.net>
Although the VPN is only for very temporary use (while on a short holiday), I still would like some kind of management interface to the OpenVPN server so I can keep an eye on who is connected. It could be done through monitoring /tmp/openvpn.log but this does not give me the option of forcefully disconnecting anyone, for example.
The OpenVPN manual at https://openvpn.net/index.php/open-sour … howto.html states the following:
To enable the management interface on either an OpenVPN server or client, add this to the configuration file:
management localhost 7505
If I understand correctly, on OpenWrt we don't use the regular OpenVPN config file but rather an uci config file at /etc/config/openvpn which is then somehow translated into something OpenVPN understands. So I will have to translate this "management localhost 7505" into the format of the uci config file.
The problem: I tried to do exactly that, but somehow it's not working. Here is my current config file:
root@RavelRouter:~# cat /etc/config/openvpn
#config openvpn custom_config
# option enabled '1'
# option config '/etc/openvpn/custom_config.conf'config openvpn 'myvpn'
option enabled '1'
option dev 'tun'
option proto 'udp'
option log '/tmp/openvpn.log'
option verb '3'
option ca '/etc/openvpn/ca.crt'
option cert '/etc/openvpn/ravelvpn-server.crt'
option key '/etc/openvpn/ravelvpn-server.key'
option dh '/etc/openvpn/dh2048.pem'
option server '10.8.0.0 255.255.255.0'
option management '127.0.0.1 31194'config 1194 'port'
OpenVPN won't even start with this configuration. Here's the logfile:
root@RavelRouter:~# cat /tmp/openvpn.log
Options error: Unrecognized option or missing parameter(s) in openvpn-myvpn.conf:7: management (2.3.6)
Use --help for more information.
When I comment out the "option management" line in /etc/config/openvpn, all is well.
I also tried adding a pw-file to the option as follows:
option management '127.0.0.1 31194 /etc/openvpn/management.pw'
but the same error appears in /tmp/openvpn.log.
As you can see in the first lines of my /etc/config/openvpn, I also tried using a custom config file at /etc/openvpn/custom_config.conf. That config file contained only the following:
management 127.0.0.1 31194
In that case OpenVPN starts, but there is still no management interface.
At this point I'm out of ideas, so I would be very grateful if anyone with more experience could point me in the right direction here. Thank you in advance.
(Last edited by Arnie on 24 Apr 2015, 14:32)
