Hi Pari and welcome,
this process is not documented yet (we have
a ticket for it), the process is roughly the following:
- ensure OpenVPN is included in your OpenWRT firmware image or install it manually on your devices (the former option is recommended)
- install OpenVPN on the server, you can use this ansible role if you like: https://github.com/Stouts/Stouts.openvpn
- import the CA, and the server certificate in OpenWISP
- create a new VPN server, select the CA and server certificate just imported, copy the configuration parameters generated by ansible
- now create a new template of type "VPN-client"
- ensure the auto-cert option is enabled so OpenWISP will generate client x509 certificates automatically
- enable "default template" option if you want the VPN to be enabled on all the devices of that organization
- if you want to use this VPN for all the organizations leave the "organization" parameter empty
- leave the conf empty, hit "save and continue", now you can tweak the client VPN conf if you need
After all these passages, devices which will have the new VPN template will get the OpenVPN conf and the x509 certificate automatically created by OpenWISP. This does not assure the VPN will work straightaway, you may need to do some testing and tweaking before getting it right.
If you need to do some tests on the OpenWRT side, I suggest doing it on the device directly first and once you have a configuration that works you copy it into the OpenWISP web UI.
To debug, check the logs of both clients and server.
I hope this helps!
Let me know how it goes and if anything is not clear don't hesitate to ask.
Federico