Skip to content

Commit

Permalink
Update cipher to use the default openvpn ciphers (Fixes #196)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyl191 committed Dec 23, 2024
1 parent d9f1824 commit cdaceb0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ These options change how OpenVPN itself works.
|------------------------------------|---------|-------------|-------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------|
| openvpn_auth_alg | string | | SHA256 | Set `auth` authentication algoritm. |
| openvpn_ca_key | dict | | `unset` | Contain "crt" and "key". If not set, CA cert and key will be automatically generated on the target system. |
| openvpn_cipher | string | | AES-256-CBC | Set `cipher` option for server and client. |
| openvpn_cipher | string | | `unset` | Set `data-cipher` option for server and client. |
| openvpn_crl_path | string | | `unset` | Define a path to the CRL file for server revocation check. |
| openvpn_duplicate_cn | boolean | true, false | false | Add `duplicate-cn` option to server config - this allows clients to connect multiple times with the one key. NOTE: client ip addresses won't be static anymore! |
| openvpn_rsa_bits | int | | 2048 | Number of bits used to protect generated certificates |
Expand Down
2 changes: 1 addition & 1 deletion defaults/main/openvpn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ openvpn_lan_source_ip: "{{ ansible_default_ipv4.address }}"

# Security
openvpn_auth_alg: SHA256
openvpn_cipher: AES-256-CBC
openvpn_cipher: ~
openvpn_duplicate_cn: false
openvpn_rsa_bits: 2048
openvpn_use_crl: false
Expand Down
4 changes: 3 additions & 1 deletion templates/client.ovpn.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ client

tls-client
auth {{ openvpn_auth_alg }}
cipher {{ openvpn_cipher }}
{% if openvpn_cipher %}
data-ciphers {{ openvpn_cipher }}
{% endif %}
remote-cert-tls server
{% if openvpn_use_modern_tls %}
tls-version-min 1.2
Expand Down
4 changes: 3 additions & 1 deletion templates/server.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@ tls-auth {{ openvpn_key_dir }}/ta.key 0
{% endif %}
tls-server
auth {{ openvpn_auth_alg | default('SHA256') }}
cipher {{ openvpn_cipher }}
{% if openvpn_cipher %}
data-ciphers {{ openvpn_cipher }}
{% endif %}
{% if openvpn_tun_mtu %}
tun-mtu {{ openvpn_tun_mtu }}
{% endif %}
Expand Down

0 comments on commit cdaceb0

Please sign in to comment.