Feature: Added support for tls-crypt-v2 for OpenVPN (client) static keys#9798
Feature: Added support for tls-crypt-v2 for OpenVPN (client) static keys#9798ninjatrek2891 wants to merge 3 commits intoopnsense:masterfrom
Conversation
src/opnsense/mvc/app/controllers/OPNsense/OpenVPN/forms/dialogStaticKey.xml
Show resolved
Hide resolved
…eld where the option is chosen
|
I completely overlooked that one! I added the context on that line and fixed a missing space in the dropbox menu context. |
|
@ninjatrek2891 no problem, looking at our key-generation button, I think we're missing some logic to generate the proper key type as well. How did you test this feature? (I expect you pasted your own key in there) |
|
I tested the changes by changing the php files directly on the firewall via the shell. It all looks okay on my end, the openvpn instance is connecting with the tls-crypt-v2 key. I've parsed the /var/etc/openvpn/instance.conf file and it all looks okay, the key looks parsed properly. To answer your question, I used my own key. I did not use the key generation as I did have my own key. Also tls-crypt v2 requires a server and client key. The logic for it to build could be builtin Opnsense. But I think, it might be wiser to turn the button off or disabled it when crypt-v2 is chosen. |
|
let me keep this open a small while as I believe the generate button needs a fix too as it seems to only generate a single type of key. |
|
We could disable the keygen button when cryptv2 is choosen. crypt-v2 is client and server key pair. It might not belong under Static Keys as I did here.
|
|
The main difference in tls-crypt-v2 is that each client (and their server) should get their own unique key. The normal static key in tls-crypt was shared (=the same) between all clients and server. |
|
Yes, I completely understand that the crypt v2 might not be well suited descriptive wise at Static Keys. Except for the key-gen button, it worked. Is it the right philosophy to put it at Static Keys, I don't know. But it worked (for now) and I don't have to rely on the legacy plugin. |
|
I added this now it should be simpler to add the new mode to the key generation: |
|
The remaining challenge would be:
|
I made some small changes to a couple of PHP files to support a tls-crypt-v2 key in the config.
After deploying, the menu option appears under OpenVPN static keys and is added properly to the instance conf file in /var/etc/openvpn/
I also made a good connection to my openvpn instance.