Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shaoran/1db4ed8bba8bc054cd31e2ea05a668d1 to your computer and use it in GitHub Desktop.
Save shaoran/1db4ed8bba8bc054cd31e2ea05a668d1 to your computer and use it in GitHub Desktop.
NetworkManager tls-cipher=DEFAULT:@SECLEVEL=0
# Client configs, 16.04,
script-security 2
up /etc/openvpn/update-resolv-conf
down /etc/openvpn/update-resolv-conf
# network manager, 16.04, install below package to enable import openvpn client configs
sudo apt install network-manager-openvpn-gnome
# Client configs, 18.04/18.10
# nm-connection-editor can help with adding option below
script-security 2
up /etc/openvpn/update-systemd-resolved
down /etc/openvpn/update-systemd-resolved
## if you have the error: cert too weak (OpenSSL: error:140AB18E:SSL routines:SSL_CTX_use_certificate:ca md too weak)
## add to client config
tls-cipher "DEFAULT:@SECLEVEL=0"
# network manager, 18.04, install below package to enable import openvpn client configs
sudo apt install network-manager-openvpn-gnome
# to work around the cert too weak issue in network manager imported openvpn configs
# under the [vpn] section in `/etc/NetworkManager/system-connections/<connection name>` add the line:
tls-cipher=DEFAULT:@SECLEVEL=0
# if need additonal domains not specified by the dhcp push
domain-search=<domain1>;<domain2>;
@rwp0
Copy link

rwp0 commented Jan 16, 2023

Yeah, mention that do systemctl restart NetworkManager once adding that line in the .nmconnection file.
I can add that: Ubuntu 22.04 make this error happen while Debian 11 was silent.
Thanks for this tip.

@ggkoala
Copy link

ggkoala commented Aug 24, 2023

thank you very much !!!!

@xalt7x
Copy link

xalt7x commented Sep 27, 2023

For GNOME 43+ (Debian 12, Ubuntu 23.04 etc) you can add some parameters (e.g. DEFAULT:@SECLEVEL=0") via GUI.
This way NetworkManager service restart is not required.

Connection settings > Identity > Advanced > TLS Authentication > TLS cipher string)

openvpn-cert-security

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment