1
19.1 Legacy Series / Re: Forcing AES-NI for IPsec and OpenVPN when VPS fails to forward CPU flags
« on: March 18, 2019, 11:11:47 am »
Are you sure IPsec on OPNsense uses OpenSSL/LibreSSL?
From what I've found in strongswan docs and forums, strongswan has its own, built-in AES-NI module, but it's only used for IKE - actual traffic encryption/decryption is done in kernel using its AESNI module if loaded.
That means unless it's possible to force original AESNI flag on (like it's possible on Linux - https://www.lowendtalk.com/discussion/132214/force-kernel-aes-ni-usage-on-a-vps-without-the-aes-cpu-flag), strongswan would require its own workaround, and another one for kernel.
Regarding OpenVPN, looks like I need to add the OPENSSL_ia32cap setting to environment where OpenVPN runs.
How can I add it? I've tried to add it to default section of login.conf (and rebuild the database), but that doesn't seem to help.
From what I've found in strongswan docs and forums, strongswan has its own, built-in AES-NI module, but it's only used for IKE - actual traffic encryption/decryption is done in kernel using its AESNI module if loaded.
That means unless it's possible to force original AESNI flag on (like it's possible on Linux - https://www.lowendtalk.com/discussion/132214/force-kernel-aes-ni-usage-on-a-vps-without-the-aes-cpu-flag), strongswan would require its own workaround, and another one for kernel.
Regarding OpenVPN, looks like I need to add the OPENSSL_ia32cap setting to environment where OpenVPN runs.
How can I add it? I've tried to add it to default section of login.conf (and rebuild the database), but that doesn't seem to help.