I have a QNAP TS-253 Pro (QTS 4.2.0), on which a OpenVPN-server is configured and running fine. Since I want to use client-certificates to secure the VPN connections, the built-in configuration on the web interface is of no use at all.
So I imported my config and certificate files via SSH / SCP to /etc/openvpn, restarted the OpenVPN server and it worked well until i rebooted the QNAP NAS. The config was gone back to QNAPs factory default.
It appears, the /etc/openvpn directory is just a symlink to /mnt/ext/opt/vpnopenvpn/etc/openvpn/, which holds the original config from the webinterface of my QNAP. Next thing I tried was to edit the config there, and hoped it won't be replaced at the next boot, but this was not a solution. Rebooted and found the factory-default OpenVPN config files in /mnt/ext/opt/vpnopenvpn/etc/openvpn/.
I digged through many threads on QNAPs official forum, inofficial blog posts, and some init.d-scripts on the QNAP itself to find a way to either turn off the automatic rollout of the factory-default settings or make the QNAP roll out my working configuration to /etc/openvpn.
Here is a list of my unsucessfull tries:
- Copied config to /etc/openvpn - config got rewritten at boot
- Copied config to /mnt/ext/opt/vpnopenvpn/etc/openvpn/ - config got rewritten at boot
- Followed instructions at: http://wiki.nas-portal.org/index.php/Install_OpenVPN_on_QNAP - could not find qpkg / ipkg in the actual version of QTS (running 4.2.0), maybe the tutorial is written for an older release...
- Tried to run a self-created autorun.sh-script as described here: http://forum.qnap.com/viewtopic.php?t=83804#p372711 - folders at /share seem to be recreated at every boot
- Completely digged through this thread, recommended from users at official QNAP forums: http://forum.qnap.com/viewtopic.php?f=90&p=61890&t=10400&sid=6aa706cb2ff41a75c6f048883328512a - doesn't seem to be regarding my specific problem / configuration
- Commented out the openvpn-specific sections in /etc/init.d/installtgz.sh - the file itself got rewritten at boot and my comments were an active part of the script again
Does anyone know, how to stop QTS to rewrite my configuration files? I dont want to copy the OpenVPN config manually every time the QNAP is rebooted...