d3vilh / openvpn-ui

Web User Interface for OpenVPN
MIT License
173 stars 39 forks source link

easy RSA vars, client/server default config files #16

Closed reamasesa closed 9 months ago

reamasesa commented 10 months ago

Hi,

Thank you for this neat project :)

  1. I would like to set the easy-rsa defaults but no matter where I put the easy-rsa.vars and the vars files (config/pki directories), the UI shows the default ones that arrived with the container image

  2. When creating a user configuration file from the UI, none of the easy RSA values from either ./config/easy-rsa.vars, ./config/vars or ./pki/vars are added to the certificate (it's the same with the server's certificate, only the CN field contains information)

  3. Same with the server/client.conf files, unless I use the UI to change, f.e., the server's IP/FQDN, the files I placed in the "config" directory don't get used

  4. I would also, if possible, ask for tags other than "latest" so I'll be able to use specific releases in my setup

I would like to automate this with my own values, perhaps I am using this tool(s) wrong and need some guidance

Thanks

d3vilh commented 10 months ago

Hi @reamasesa, Thank you for the feedback.

  1. conf/openvpn-server-config.tpl
  2. When creating a user configuration file from the UI

I know this mess with easy-rsa vars I'm currently working to fix it in next release by introducing two new tabs, so you can set vars with UI:

EesyRSA vars

Знімок екрана 2023-08-31 о 22 49 14

Maintenance

Знімок екрана 2023-08-31 о 22 50 25

The root cause of this mess is two different containers pointed to the same EasyRSA and PKI configuration. After the UI change I'll do a containers code cleanup and remove not necessary configuration files so, it will not confuse people anymore. In short main vars configuration file is ./pki/vars and it is used during Certificate generation in the latest version.

  1. Same with the server/client.conf files

UI and OpenVPN server both use the same server.conf file from ./openvpn/config/server.conf.

Again, the latest aka dev1 version have separate Client configuration page, so you can set address, port and port there and all new certificates will have this parameters inside:

Знімок екрана 2023-08-31 о 23 02 52
  1. I would also, if possible, ask for tags other than "latest" so I'll be able to use specific releases in my setup.

This is a TOP suggestion 😁 Literally the comment of the day. I see more people are interesting in this project, so I'm changing release policy. Now and forever :current on Docker Hub and here will be linked to last current release version on top of this I'll start using version tags on Docker Hub and here as well.

Now Current is 0.4 on Docker Hub and 0.4 on GitHub (I'll just drop it).

The development is Dev on Docker Hub (there is only arm64 version) and Dev* branch on GitHub.

You can try Dev image from DockerHub it is pretty stable, but still did not tested with full scope.

reamasesa commented 10 months ago

@d3vilh

Sorry for the late reply, it has been a rough stretch here and I was away from my, well, everything :)

Thank you for your reply, it was very enlightening and useful, I would request, if possible, that you'd consider "automation" for this, I'd like to provide my own set of configuration files, with the correct syntax and variables, of course, that the UI will read (or create if not supplied), the thought behind this, is providing our support engineer the ability to create users without the need to change anything else in the UI, on the rare occasion where a change in configuration is needed, it can be done either from UI or config file (preferably UI so there will not be any stray files with weird configuration someone forgot to delete/commit) so the whole deployment can be automated easily without the need to follow with UI changes

Thanks a lot for this nifty project, it's already proven valuable

d3vilh commented 9 months ago

I'd like to provide my own set of configuration files,

you can do it with version 0.9 its have completely redesigned Server and Client configuration templates approach, as well as option to customise configuration files.

d3vilh commented 9 months ago

Closing this thread as "implemented" features. Were implemented in version 0.9.