AS server cipher setting not affecting client conf?

Business solution to host your own OpenVPN server with web management interface and bundled clients.
Post Reply
lv426hudson
OpenVpn Newbie
Posts: 3
Joined: Fri Sep 15, 2023 1:04 pm

AS server cipher setting not affecting client conf?

Post by lv426hudson » Fri Sep 15, 2023 1:30 pm

Hi,

I am running an AS on Debian 10. On the web server it doesn't seem to matter what I set the cipher to be, the client ovpn file downloaded always seems to have the cipher set to "cipher AES-256-CBC"? I am trying to set AES-256-GCM. Am i missing something (obviously)?

Cheers,

https://i.imgur.com/SF2hlO1.png

# From ovpn file
# Default Cipher
cipher AES-256-CBC

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: AS server cipher setting not affecting client conf?

Post by openvpn_inc » Fri Sep 15, 2023 1:55 pm

Hi lv426hudson,

Your confusion is understandable. The derivation of how ciphers work is complicated due to a need for backward compatibility.

Basically the 'cipher' parameter will be used by older OpenVPN2 clients that do not know what to do with cipher negotiation. Those are also not capable of GCM as GCM was introduced around the same time as the cipher negotiation.

In strength AES-256-CBC and AES-256-GCM are about equivalent, but GCM is a bit more efficient.

If the OpenVPN client is capable of it, it will negotiate for a better cipher with the server. There is a default data-cipher string for that on the client side as well that prefers AES-256-GCM. Since you only put in 1 cipher on the server side, it will negotiate to that AES-256-GCM cipher. You can confirm this by looking at logs and seeing that the data channel cipher is AES-256-GCM. So your change does take effect.

I would however advise that you add the data cipher AES-256-CBC to retain compatibility with older clients that don't know how to do such negotiation and don't support GCM, but do read the 'cipher' parameter and are at least capable of AES-256-CBC. At the moment you've denied the Access Server to allow AES-256-CBC and then those older clients just simply can't connect. You can solve this by setting data cipher to AES-256-GCM:AES-256-CBC.

I would recommend you leave AES-256-GCM as primary cipher and add AES-256-CBC as a secondary supported cipher and don't try to mess with the cipher directive. It is for backward compatibility so older clients will work, and does not hurt up-to-date clients as they will negotiate to the primary cipher AES-256-GCM.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: AS server cipher setting not affecting client conf?

Post by openvpn_inc » Fri Sep 15, 2023 2:02 pm

Oh I forgot to add that this document discusses changing the cipher as well;

https://openvpn.net/vpn-server-resource ... ss-server/

But yeah, security related stuff can be a bit technical, especially when backward compatibility is mixed in and things change.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

lv426hudson
OpenVpn Newbie
Posts: 3
Joined: Fri Sep 15, 2023 1:04 pm

Re: AS server cipher setting not affecting client conf?

Post by lv426hudson » Fri Sep 15, 2023 4:00 pm

Thanks for the response. Yes I noticed in the log that even though the client file had CBC in, it still used the CGM :-)

Are the settings that are made on the web server stored anywhere on the Linux platform where I can recover a conf file from?

I notice that the configuration in the "/usr/local/openvpn_as/etc/as.conf" doesn't match the web server.

User avatar
openvpn_inc
OpenVPN Inc.
Posts: 1333
Joined: Tue Feb 16, 2021 10:41 am

Re: AS server cipher setting not affecting client conf?

Post by openvpn_inc » Sat Sep 16, 2023 6:36 pm

Hello lv426hudson,

Sorry, but the configuration is fed directly to the OpenVPN daemons using the management interface, it isn't stored on disk like a text file like on community version.

Kind regards,
Johan
Image OpenVPN Inc.
Answers provided by OpenVPN Inc. staff members here are provided on a voluntary best-effort basis, and no rights can be claimed on the basis of answers posted in this public forum. If you wish to get official support from OpenVPN Inc. please use the official support ticket system: https://openvpn.net/support

Post Reply