OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Help on building IPFire & Feature Requests
ummeegge
Community Developer
Community Developer
Posts: 5001
Joined: October 9th, 2010, 10:00 am

OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by ummeegge » April 27th, 2019, 1:27 pm

Hi all,
since the whole renewal of the PKI has been a lot of problems creating the Diffie-Hellman parameter (>=2048bit) i was thinking about some possible solutions for a better and more practical way. IPFires PKI still uses RSA but partly also ECC, this is currently only true for the control channel whereby the range goes e.g. from

Code: Select all

Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384, 2048 bit RSA
to

Code: Select all

Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305, 2048 bit RSA
which depends on the appropriate systems.
Since the dh-parameter establishes the session key via the control channel i was asking myself why do we need it since there is already a ECDHE (ECC) in usage. Searching a little around and found the option (quotes are from from https://community.openvpn.net/openvpn/w ... n24ManPage):

'--dh none' -->
--dh file
File containing Diffie Hellman parameters in .pem format (required for --tls-server only).

Set file=none to disable Diffie Hellman key exchange (and use ECDH only). Note that this requires peers to be using an SSL library that supports ECDH TLS cipher suites (e.g. OpenSSL 1.0.1+, or mbed TLS 2.0+).

Use openssl dhparam -out dh2048.pem 2048 to generate 2048-bit DH parameters. Diffie Hellman parameters may be considered public.

but also '--ecdh-curve' -->
--ecdh-curve name
Specify the curve to use for elliptic curve Diffie Hellman. Available curves can be listed with --show-curves. The specified curve will only be used for ECDH TLS-ciphers.

This option is not supported in mbed TLS builds of OpenVPN.
Tested this now and deleted all dh-parameter sections in the ovpnmain.cgi, recreated a new PKI without dh-parameter but with

Code: Select all

dh none
ecdh-curve secp384r1
<-- new parameters are only needed in server configurations!

Server log:

Code: Select all

Apr 27 15:08:08 ipfire openvpnserver[24982]: Current Parameter Settings:
Apr 27 15:08:08 ipfire openvpnserver[24982]:   config = '/var/ipfire/ovpn/server.conf'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   mode = 1
Apr 27 15:08:08 ipfire openvpnserver[24982]:   persist_config = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   persist_mode = 1
Apr 27 15:08:08 ipfire openvpnserver[24982]:   show_ciphers = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   show_digests = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   show_engines = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   genkey = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   key_pass_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   show_tls_ciphers = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   connect_retry_max = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]: Connection profiles [0]:
Apr 27 15:08:08 ipfire openvpnserver[24982]:   proto = udp
Apr 27 15:08:08 ipfire openvpnserver[24982]:   local = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   local_port = '1194'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   remote = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   remote_port = '1194'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   remote_float = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   bind_defined = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   bind_local = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   bind_ipv6_only = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   connect_retry_seconds = 5
Apr 27 15:08:08 ipfire openvpnserver[24982]:   connect_timeout = 120
Apr 27 15:08:08 ipfire openvpnserver[24982]:   socks_proxy_server = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   socks_proxy_port = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tun_mtu = 1400
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tun_mtu_defined = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   link_mtu = 1500
Apr 27 15:08:08 ipfire openvpnserver[24982]:   link_mtu_defined = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tun_mtu_extra = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tun_mtu_extra_defined = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   mtu_discover_type = -1
Apr 27 15:08:08 ipfire openvpnserver[24982]:   fragment = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   mssfix = 1450
Apr 27 15:08:08 ipfire openvpnserver[24982]:   explicit_exit_notification = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]: Connection profiles END
Apr 27 15:08:08 ipfire openvpnserver[24982]:   remote_random = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ipchange = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   dev = 'tun'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   dev_type = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   dev_node = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   lladdr = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   topology = 1
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_local = '10.63.16.1'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_remote_netmask = '10.63.16.2'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_noexec = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_nowarn = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_ipv6_local = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_ipv6_netbits = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_ipv6_remote = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   shaper = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   mtu_test = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   mlock = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   keepalive_ping = 10
Apr 27 15:08:08 ipfire openvpnserver[24982]:   keepalive_timeout = 60
Apr 27 15:08:08 ipfire openvpnserver[24982]:   inactivity_timeout = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ping_send_timeout = 10
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ping_rec_timeout = 120
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ping_rec_timeout_action = 2
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ping_timer_remote = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   remap_sigusr1 = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   persist_tun = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   persist_local_ip = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   persist_remote_ip = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   persist_key = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   passtos = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   resolve_retry_seconds = 1000000000
Apr 27 15:08:08 ipfire openvpnserver[24982]:   resolve_in_advance = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   username = 'nobody'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   groupname = 'nobody'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   chroot_dir = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   cd_dir = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   writepid = '/var/run/openvpn.pid'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   up_script = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   down_script = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   down_pre = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   up_restart = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   up_delay = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   daemon = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   inetd = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   log = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   suppress_timestamps = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   machine_readable_output = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   nice = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   verbosity = 4
Apr 27 15:08:08 ipfire openvpnserver[24982]:   mute = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   gremlin = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   status_file = '/var/run/ovpnserver.log'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   status_file_version = 1
Apr 27 15:08:08 ipfire openvpnserver[24982]:   status_file_update_freq = 30
Apr 27 15:08:08 ipfire openvpnserver[24982]:   occ = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   rcvbuf = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   sndbuf = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   mark = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   sockflags = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   fast_io = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   comp.alg = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   comp.flags = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_script = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_default_gateway = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_default_metric = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_noexec = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_delay = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_delay_window = 30
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_delay_defined = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_nopull = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route_gateway_via_dhcp = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   allow_pull_fqdn = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   route 10.63.16.0/255.255.255.0/default (not set)/default (not set)
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_addr = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_port = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_user_pass = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_log_history_cache = 250
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_echo_buffer_size = 100
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_write_peer_info_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_client_user = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_client_group = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   management_flags = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   shared_secret_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   key_direction = not set
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ciphername = 'AES-256-GCM'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ncp_enabled = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ncp_ciphers = 'AES-256-GCM:AES-128-GCM'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   authname = 'SHA512'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   prng_hash = 'SHA1'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   prng_nonce_secret_len = 16
Apr 27 15:08:08 ipfire openvpnserver[24982]:   keysize = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   engine = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   replay = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   mute_replay_warnings = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   replay_window = 64
Apr 27 15:08:08 ipfire openvpnserver[24982]:   replay_time = 15
Apr 27 15:08:08 ipfire openvpnserver[24982]:   packet_id_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   use_iv = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   test_crypto = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_server = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_client = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   key_method = 2
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ca_file = '/var/ipfire/ovpn/ca/cacert.pem'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ca_path = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   dh_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   cert_file = '/var/ipfire/ovpn/certs/servercert.pem'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   extra_certs_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   priv_key_file = '/var/ipfire/ovpn/certs/serverkey.pem'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   pkcs12_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   cipher_list = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   cipher_list_tls13 = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_cert_profile = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_verify = '/usr/lib/openvpn/verify'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_export_cert = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   verify_x509_type = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   verify_x509_name = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   crl_file = '/var/ipfire/ovpn/crls/cacrl.pem'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ns_cert_type = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   remote_cert_ku[i] = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   remote_cert_eku = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ssl_flags = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_timeout = 2
Apr 27 15:08:08 ipfire openvpnserver[24982]:   renegotiate_bytes = -1
Apr 27 15:08:08 ipfire openvpnserver[24982]:   renegotiate_packets = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   renegotiate_seconds = 3600
Apr 27 15:08:08 ipfire openvpnserver[24982]:   handshake_window = 60
Apr 27 15:08:08 ipfire openvpnserver[24982]:   transition_window = 3600
Apr 27 15:08:08 ipfire openvpnserver[24982]:   single_session = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_peer_info = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_exit = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_auth_file = '/var/ipfire/ovpn/certs/ta.key'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tls_crypt_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   server_network = 10.63.16.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   server_netmask = 255.255.255.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   server_network_ipv6 = ::
Apr 27 15:08:08 ipfire openvpnserver[24982]:   server_netbits_ipv6 = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   server_bridge_ip = 0.0.0.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   server_bridge_netmask = 0.0.0.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   server_bridge_pool_start = 0.0.0.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   server_bridge_pool_end = 0.0.0.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_entry = 'route 10.63.16.1'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_entry = 'topology net30'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_entry = 'ping 10'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_entry = 'ping-restart 60'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_pool_defined = ENABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_pool_start = 10.63.16.4
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_pool_end = 10.63.16.251
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_pool_netmask = 0.0.0.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_pool_persist_filename = '/var/ipfire/ovpn/ovpn-leases.db'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_pool_persist_refresh_freq = 3600
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_ipv6_pool_defined = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_ipv6_pool_base = ::
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ifconfig_ipv6_pool_netbits = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   n_bcast_buf = 256
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tcp_queue_limit = 64
Apr 27 15:08:08 ipfire openvpnserver[24982]:   real_hash_size = 256
Apr 27 15:08:08 ipfire openvpnserver[24982]:   virtual_hash_size = 256
Apr 27 15:08:08 ipfire openvpnserver[24982]:   client_connect_script = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   learn_address_script = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   client_disconnect_script = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   client_config_dir = '/var/ipfire/ovpn/ccd'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   ccd_exclusive = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   tmp_dir = '/tmp'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_ifconfig_defined = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_ifconfig_local = 0.0.0.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_ifconfig_remote_netmask = 0.0.0.0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_ifconfig_ipv6_defined = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_ifconfig_ipv6_local = ::/0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   push_ifconfig_ipv6_remote = ::
Apr 27 15:08:08 ipfire openvpnserver[24982]:   enable_c2c = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   duplicate_cn = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   cf_max = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   cf_per = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   max_clients = 100
Apr 27 15:08:08 ipfire openvpnserver[24982]:   max_routes_per_client = 256
Apr 27 15:08:08 ipfire openvpnserver[24982]:   auth_user_pass_verify_script = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   auth_user_pass_verify_script_via_file = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   auth_token_generate = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   auth_token_lifetime = 0
Apr 27 15:08:08 ipfire openvpnserver[24982]:   port_share_host = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   port_share_port = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]:   client = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   pull = DISABLED
Apr 27 15:08:08 ipfire openvpnserver[24982]:   auth_user_pass_file = '[UNDEF]'
Apr 27 15:08:08 ipfire openvpnserver[24982]: OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD] built on Mar 14 2019
Apr 27 15:08:08 ipfire openvpnserver[24982]: library versions: OpenSSL 1.1.1b  26 Feb 2019, LZO 2.09
Apr 27 15:08:08 ipfire openvpnserver[24983]: NOTE: the current --script-security setting may allow this configuration to call user-defined scripts
Apr 27 15:08:08 ipfire openvpnserver[24983]: ECDH curve secp384r1 added
Apr 27 15:08:08 ipfire openvpnserver[24983]: Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Apr 27 15:08:08 ipfire openvpnserver[24983]: Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Apr 27 15:08:08 ipfire openvpnserver[24983]: WARNING: normally if you use --mssfix and/or --fragment, you should also set --tun-mtu 1500 (currently it is 1400)
Apr 27 15:08:08 ipfire openvpnserver[24983]: TLS-Auth MTU parms [ L:1521 D:1140 EF:110 EB:0 ET:0 EL:3 ]
Apr 27 15:08:08 ipfire openvpnserver[24983]: ROUTE_GATEWAY 192.168.2.1/255.255.255.0 IFACE=red0 HWADDR=00:30:18:aa:50:55
Apr 27 15:08:08 ipfire openvpnserver[24983]: TUN/TAP device tun0 opened
Apr 27 15:08:08 ipfire openvpnserver[24983]: TUN/TAP TX queue length set to 100
Apr 27 15:08:08 ipfire openvpnserver[24983]: do_ifconfig, tt->did_ifconfig_ipv6_setup=0
Apr 27 15:08:08 ipfire openvpnserver[24983]: /sbin/ip link set dev tun0 up mtu 1400
Apr 27 15:08:08 ipfire openvpnserver[24983]: /sbin/ip addr add dev tun0 local 10.63.16.1 peer 10.63.16.2
Apr 27 15:08:08 ipfire openvpnserver[24983]: /sbin/ip route add 10.63.16.0/24 via 10.63.16.2
Apr 27 15:08:08 ipfire openvpnserver[24983]: Data Channel MTU parms [ L:1521 D:1450 EF:121 EB:389 ET:0 EL:3 ]
Apr 27 15:08:08 ipfire openvpnserver[24983]: Could not determine IPv4/IPv6 protocol. Using AF_INET
Apr 27 15:08:08 ipfire openvpnserver[24983]: Socket Buffers: R=[212992->212992] S=[212992->212992]
Apr 27 15:08:08 ipfire openvpnserver[24983]: UDPv4 link local (bound): [AF_INET][undef]:1194
Apr 27 15:08:08 ipfire openvpnserver[24983]: UDPv4 link remote: [AF_UNSPEC]
Apr 27 15:08:08 ipfire openvpnserver[24983]: GID set to nobody
Apr 27 15:08:08 ipfire openvpnserver[24983]: UID set to nobody
Apr 27 15:08:08 ipfire openvpnserver[24983]: MULTI: multi_init called, r=256 v=256
Apr 27 15:08:08 ipfire openvpnserver[24983]: IFCONFIG POOL: base=10.63.16.4 size=62, ipv6=0
Apr 27 15:08:08 ipfire openvpnserver[24983]: ifconfig_pool_read(), in='testDHnone,10.63.16.4', TODO: IPv6
Apr 27 15:08:08 ipfire openvpnserver[24983]: succeeded -> ifconfig_pool_set()
Apr 27 15:08:08 ipfire openvpnserver[24983]: IFCONFIG POOL LIST
Apr 27 15:08:08 ipfire openvpnserver[24983]: testDHnone,10.63.16.4
Apr 27 15:08:08 ipfire openvpnserver[24983]: Initialization Sequence Completed
Apr 27 15:10:44 ipfire openvpnserver[24983]: MULTI: multi_create_instance called
Apr 27 15:10:44 ipfire openvpnserver[24983]: 192.168.123.4:56412 Re-using SSL/TLS context
Apr 27 15:10:44 ipfire openvpnserver[24983]: 192.168.123.4:56412 Control Channel MTU parms [ L:1521 D:1140 EF:110 EB:0 ET:0 EL:3 ]
Apr 27 15:10:44 ipfire openvpnserver[24983]: 192.168.123.4:56412 Data Channel MTU parms [ L:1521 D:1450 EF:121 EB:389 ET:0 EL:3 ]
Apr 27 15:10:44 ipfire openvpnserver[24983]: 192.168.123.4:56412 Local Options String (VER=V4): 'V4,dev-type tun,link-mtu 1449,tun-mtu 1400,proto UDPv4,cipher AES-256-GCM,auth [null-digest],keysize 256,tls-auth,key-method 2,tls-server'
Apr 27 15:10:44 ipfire openvpnserver[24983]: 192.168.123.4:56412 Expected Remote Options String (VER=V4): 'V4,dev-type tun,link-mtu 1449,tun-mtu 1400,proto UDPv4,cipher AES-256-GCM,auth [null-digest],keysize 256,tls-auth,key-method 2,tls-client'
Apr 27 15:10:44 ipfire openvpnserver[24983]: 192.168.123.4:56412 TLS: Initial packet from [AF_INET]192.168.123.4:56412, sid=4397ab3a 94d41f2d
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 VERIFY SCRIPT OK: depth=1, C=DE, ST=HH, L=Karlsruhe, O=test, OU=FZeit, CN=test CA, emailAddress=ue@xxx.xxx
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 VERIFY OK: depth=1, C=DE, ST=HH, L=Karlsruhe, O=test, OU=FZeit, CN=test CA, emailAddress=ue@xxx.xxx
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 VERIFY SCRIPT OK: depth=0, C=DE, ST=HH, O=test, OU=FZeit, CN=testDHnone
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 VERIFY OK: depth=0, C=DE, ST=HH, O=test, OU=FZeit, CN=testDHnone
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_VER=2.4.7
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_PLAT=linux
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_PROTO=2
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_NCP=2
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_LZ4=1
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_LZ4v2=1
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_LZO=1
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_COMP_STUB=1
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_COMP_STUBv2=1
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 peer info: IV_TCPNL=1
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305, 2048 bit RSA
Apr 27 15:10:45 ipfire openvpnserver[24983]: 192.168.123.4:56412 [testDHnone] Peer Connection Initiated with [AF_INET]192.168.123.4:56412
Apr 27 15:10:45 ipfire openvpnserver[24983]: testDHnone/192.168.123.4:56412 OPTIONS IMPORT: reading client specific options from: /var/ipfire/ovpn/ccd/testDHnone
Apr 27 15:10:45 ipfire openvpnserver[24983]: testDHnone/192.168.123.4:56412 MULTI_sva: pool returned IPv4=10.63.16.6, IPv6=(Not enabled)
Apr 27 15:10:45 ipfire openvpnserver[24983]: testDHnone/192.168.123.4:56412 MULTI: Learn: 10.63.16.6 -> testDHnone/192.168.123.4:56412
Apr 27 15:10:45 ipfire openvpnserver[24983]: testDHnone/192.168.123.4:56412 MULTI: primary virtual IP for testDHnone/192.168.123.4:56412: 10.63.16.6
Apr 27 15:10:46 ipfire openvpnserver[24983]: testDHnone/192.168.123.4:56412 PUSH: Received control message: 'PUSH_REQUEST'
Apr 27 15:10:46 ipfire openvpnserver[24983]: testDHnone/192.168.123.4:56412 SENT CONTROL [testDHnone]: 'PUSH_REPLY,route 10.63.16.1,topology net30,ping 10,ping-restart 60,redirect-gateway,route 192.168.234.0 255.255.255.0,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,ifconfig 10.63.16.6 10.63.16.5,peer-id 0' (status=1)
Client log:

Code: Select all

[dh_none] sudo openvpn --config testDHnone-TO-IPFire.ovpn                                                     15:10:24 
[sudo] password for ummeegge:         
Sat Apr 27 15:10:33 2019 OpenVPN 2.4.7 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Feb 19 2019
Sat Apr 27 15:10:33 2019 library versions: OpenSSL 1.1.0g  2 Nov 2017, LZO 2.08
Enter Private Key Password: *********
Sat Apr 27 15:10:46 2019 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Sat Apr 27 15:10:46 2019 Outgoing Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Apr 27 15:10:46 2019 Incoming Control Channel Authentication: Using 512 bit message hash 'SHA512' for HMAC authentication
Sat Apr 27 15:10:46 2019 TCP/UDP: Preserving recently used remote address: [AF_INET]192.168.123.1:1194
Sat Apr 27 15:10:46 2019 Socket Buffers: R=[212992->212992] S=[212992->212992]
Sat Apr 27 15:10:46 2019 UDP link local: (not bound)
Sat Apr 27 15:10:46 2019 UDP link remote: [AF_INET]192.168.123.1:1194
Sat Apr 27 15:10:46 2019 TLS: Initial packet from [AF_INET]192.168.123.1:1194, sid=048334e4 eea4a8a9
Sat Apr 27 15:10:46 2019 VERIFY OK: depth=1, C=DE, ST=HH, L=Karlsruhe, O=test, OU=FZeit, CN=test CA, emailAddress=ue@xxx.xxx
Sat Apr 27 15:10:46 2019 VERIFY KU OK
Sat Apr 27 15:10:46 2019 Validating certificate extended key usage
Sat Apr 27 15:10:46 2019 ++ Certificate has EKU (str) TLS Web Server Authentication, expects TLS Web Server Authentication
Sat Apr 27 15:10:46 2019 VERIFY EKU OK
Sat Apr 27 15:10:46 2019 VERIFY X509NAME OK: C=DE, ST=HH, O=test, OU=FZeit, CN=ipfire.local
Sat Apr 27 15:10:46 2019 VERIFY OK: depth=0, C=DE, ST=HH, O=test, OU=FZeit, CN=ipfire.local
Sat Apr 27 15:10:47 2019 WARNING: 'link-mtu' is used inconsistently, local='link-mtu 1549', remote='link-mtu 1449'
Sat Apr 27 15:10:47 2019 WARNING: 'tun-mtu' is used inconsistently, local='tun-mtu 1500', remote='tun-mtu 1400'
Sat Apr 27 15:10:47 2019 Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305, 2048 bit RSA
Sat Apr 27 15:10:47 2019 [ipfire.local] Peer Connection Initiated with [AF_INET]192.168.123.1:1194
Sat Apr 27 15:10:48 2019 SENT CONTROL [ipfire.local]: 'PUSH_REQUEST' (status=1)
Sat Apr 27 15:10:48 2019 PUSH: Received control message: 'PUSH_REPLY,route 10.63.16.1,topology net30,ping 10,ping-restart 60,redirect-gateway,route 192.168.234.0 255.255.255.0,dhcp-option DNS 8.8.8.8,dhcp-option DNS 8.8.4.4,ifconfig 10.63.16.6 10.63.16.5,peer-id 0'
Sat Apr 27 15:10:48 2019 OPTIONS IMPORT: timers and/or timeouts modified
Sat Apr 27 15:10:48 2019 OPTIONS IMPORT: --ifconfig/up options modified
Sat Apr 27 15:10:48 2019 OPTIONS IMPORT: route options modified
Sat Apr 27 15:10:48 2019 OPTIONS IMPORT: --ip-win32 and/or --dhcp-option options modified
Sat Apr 27 15:10:48 2019 OPTIONS IMPORT: peer-id set
Sat Apr 27 15:10:48 2019 OPTIONS IMPORT: adjusting link_mtu to 1624
Sat Apr 27 15:10:48 2019 Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Apr 27 15:10:48 2019 Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Sat Apr 27 15:10:48 2019 ROUTE_GATEWAY 192.168.123.1/255.255.255.0 IFACE=wlp3s0 HWADDR=68:a8:6d:1d:2b:6f
Sat Apr 27 15:10:48 2019 TUN/TAP device tun0 opened
Sat Apr 27 15:10:48 2019 TUN/TAP TX queue length set to 100
Sat Apr 27 15:10:48 2019 /sbin/ip link set dev tun0 up mtu 1500
Sat Apr 27 15:10:48 2019 /sbin/ip addr add dev tun0 local 10.63.16.6 peer 10.63.16.5
Sat Apr 27 15:10:48 2019 /sbin/ip route add 192.168.123.1/32 dev wlp3s0
Sat Apr 27 15:10:48 2019 /sbin/ip route del 0.0.0.0/0
Sat Apr 27 15:10:48 2019 /sbin/ip route add 0.0.0.0/0 via 10.63.16.5
Sat Apr 27 15:10:48 2019 /sbin/ip route add 10.63.16.1/32 via 10.63.16.5
Sat Apr 27 15:10:48 2019 /sbin/ip route add 192.168.234.0/24 via 10.63.16.5
Sat Apr 27 15:10:48 2019 Initialization Sequence Completed
OK, what is the benefit ?
- Spared ~200 lines of code in ovpnmain.cgi.
- No DH-Parameter while PKI generation needed anymore (Gateway timeout´s are presant in the past ;).
- No tls-cipher parameter so OpenVPN uses always the current modern crypto --> https://sourceforge.net/p/openvpn/mailm ... /36436830/ .


Potential problems ?
- ecdh-curve is not supported in mbed TLS builds.
- ecdh-curve needs OpenSSL >= 1.0.1 .
- ecdh-curve needs OpenVPN 2.4.x ?

Good idea, bad idea, any thoughts ?

Best,

UE

EDITs:
- Tested curves
worked so far:
brainpool worked on server side but have had problems with clients (probably causing no TLSv1.3).
secp*r also up to 521.
prime*v1 worked so far v2 and v3 needs to be tested.

Did not worked:
c2tnb431r1
Oakley-EC2N-4
wap-wsg-idm-ecid-wtls12
X25519 or ED25519 <-- which is sad in my opinion even i found some howto´s with it --> https://blog.mirabellette.eu/index.php? ... ation-2018

- Link collector
https://community.openvpn.net/openvpn/ticket/410
https://sourceforge.net/p/openvpn/mailm ... e/36436830
https://community.openvpn.net/openvpn/w ... n24ManPage
https://csrc.nist.gov/csrc/media/events ... -ispab.pdf
https://tools.ietf.org/html/rfc4492#section-2
Image
Image

fkienker
Posts: 126
Joined: March 3rd, 2011, 4:59 pm

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by fkienker » May 2nd, 2019, 1:42 pm

This has a lot of potential. I'm okay with ecdh-curve.

I can't speak to mbed TLS - we don't employ hardware where this is used. ARM architectures, in particular, seem to need this, however.
Any modern system will have OpenSSL >= 1.0.1.
OpenVPN 2.4+ is not an issue unless the client is VERY old.

It should save some headaches. I like it.

Best regards,
Fred

ummeegge
Community Developer
Community Developer
Posts: 5001
Joined: October 9th, 2010, 10:00 am

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by ummeegge » May 3rd, 2019, 12:40 pm

Hi Fred,
fkienker wrote:
May 2nd, 2019, 1:42 pm
This has a lot of potential. I'm okay with ecdh-curve.
yes me too also, i think mostly users are using it at this time possibly without knowing it.
fkienker wrote:
May 2nd, 2019, 1:42 pm
I can't speak to mbed TLS - we don't employ hardware where this is used. ARM architectures, in particular, seem to need this, however.
This is the springing point here, which platforms do have problems with --ecdh-curve which is not manageable with an update of the system software, what´s happen to Smartphone devices, and so on ... ?! This change brings OpenVPN on IPFire only partial a fixed ECC since the certificates are nevertheless created with RSA but it is a really remarkable speed difference to generate the PKI if --dhparam will not be used anymore.
fkienker wrote:
May 2nd, 2019, 1:42 pm
Any modern system will have OpenSSL >= 1.0.1.
Yes, they really should.
fkienker wrote:
May 2nd, 2019, 1:42 pm
OpenVPN 2.4+ is not an issue unless the client is VERY old.
I think IPFire is not that bad in backwards compatibility even OpenVPN will finish this step-by-step starting with v-2.5.x, this was the reason behind all the not so nice to see warnings in the WUI which has been appeared the last time.
fkienker wrote:
May 2nd, 2019, 1:42 pm
It should save some headaches. I like it.
To reduce the headaches a little, it might be possible to let the DH-parameter upload possibility in the WUI and add a menu like
'ECDH-Curve'
'DH-Parameter (old option)'
or something like that ? So it should be nevertheless possible to let also the embedded devices and the < OpenSSL-1.0.1 users in the game ?

In any case, it might be great if more people especially (but not only) such with the above mentioned devices, makes a testing round to see what´s their differences related to the before existing configuration whereby this can easily be done with the following changes in the server.conf (do not use the save button, only server stop - then the changes and - server start)

Code: Select all

...
;dh /var/ipfire/ovpn/ca/dh1024.pem
dh none
ecdh-curve secp384r1
...
(ecdh-curve can logically differs ;) ) to test this stuff a little better. But may this is only my future sound of music ::) ... Let´s see.

Best,

UE
Image
Image

fkienker
Posts: 126
Joined: March 3rd, 2011, 4:59 pm

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by fkienker » May 3rd, 2019, 2:06 pm

You have a point about smartphones. I am going to check with those users and see how this would affect them.

Given how simple this change is, I will test it on some of our live VPN connections during off-hours and see how well it works.

Best regards,
Fred

fkienker
Posts: 126
Joined: March 3rd, 2011, 4:59 pm

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by fkienker » May 8th, 2019, 1:20 am

Have been testing first with a test Net-to-Net connection, and now with two "live" Net-to-Net connections. All the tests have gone well, and the reconnect times seem to have dropped slightly.

Next is to test with "road warrior" connections to laptops and desktops. That goes well, next will be testing with smartphones.

Best regards,
Fred

ummeegge
Community Developer
Community Developer
Posts: 5001
Joined: October 9th, 2010, 10:00 am

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by ummeegge » May 8th, 2019, 3:17 am

Hi Fred,
and thanks for your testing can you may post the ciphers from the "Control Channel:" line ? Especially if they differs it might be interesting what encryption are in usage for the different clients.

Best,

UE
Image
Image

fkienker
Posts: 126
Joined: March 3rd, 2011, 4:59 pm

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by fkienker » May 8th, 2019, 1:54 pm

The same cipher is in use on both systems for n2n connections:

May 8 09:40:21 xx-xxx xxxxn2n[2826]: Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, 2048 bit RSA

I have get a testing window for the "road warriors" and will let you know.

Best regards,
Fred

ummeegge
Community Developer
Community Developer
Posts: 5001
Joined: October 9th, 2010, 10:00 am

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by ummeegge » May 20th, 2019, 4:51 am

Hi Fred,
fkienker wrote:
May 8th, 2019, 1:54 pm
I have get a testing window for the "road warriors" and will let you know.
any news here ?

Best,

UE
Image
Image

fkienker
Posts: 126
Joined: March 3rd, 2011, 4:59 pm

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by fkienker » May 22nd, 2019, 3:04 pm

Update - testing with non-smartphone road warriors is done. After some clean up with very old setups, everything now works well.

On to smartphones now. If the last road warrior checks were hard this could be worse. I've been warned that iPhones, in particular, do lots of non-standard things.

With Android devices, there are numerous clients available. Do you have any opinions as to a prefered Android OpenVPN client? If there is one which stands out, we may ask our users to standardize on one particular one rather than try to work through making many different ones work.

Best regards,
Fred

ummeegge
Community Developer
Community Developer
Posts: 5001
Joined: October 9th, 2010, 10:00 am

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by ummeegge » May 23rd, 2019, 5:53 am

Hi Fred,
and thanks for your tests.
fkienker wrote:
May 22nd, 2019, 3:04 pm
Update - testing with non-smartphone road warriors is done. After some clean up with very old setups, everything now works well.
Good to hear. Have also search a little around causing the iOS topic but have not found really updated informations causing this specific topic. In here --> https://forums.openvpn.net/viewtopic.php?t=25597 it has been pointed out that iOS can handle the key exchange with EC (what we are testing here) but do have problems with EC signatures ECDSA (complete ECC). So a complete migration to ECC with OpenVPN might be problematic but this topic is from Jan. 2018 may thing has been changed meanwhile.
fkienker wrote:
May 22nd, 2019, 3:04 pm
On to smartphones now. If the last road warrior checks were hard this could be worse. I've been warned that iPhones, in particular, do lots of non-standard things.
What kind of problems appeared and for what kind of problems you have been warned ?
fkienker wrote:
May 22nd, 2019, 3:04 pm
With Android devices, there are numerous clients available. Do you have any opinions as to a prefered Android OpenVPN client? If there is one which stands out, we may ask our users to standardize on one particular one rather than try to work through making many different ones work.
For the testing round are more systems/client better then less but for a good preference for Android apps i have heard (no experience) good things about "OpenVPN for Android" --> https://play.google.com/store/apps/deta ... n&hl=en_US --> http://ics-openvpn.blinkt.de/FAQ.html . In 2017 it was already possible to use ecdh-curves with that app --> https://gist.github.com/pwnsdx/8fc14ee1e9f561a0a5b8 (<-- last comment).

Some news from here: There is also no need to add 'ecdh-curve [CIPHER]' to server.conf . A 'dh none' is enough even i could not figured out what the differences are since also a definition of the curve seems not to fix this settings but only a definition of 'tls-cipher' does which IPFire don´t do so a best practice cipher list according to OpenVPN will be used.

Best,

UE
Image
Image

fkienker
Posts: 126
Joined: March 3rd, 2011, 4:59 pm

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by fkienker » May 23rd, 2019, 9:41 pm

I have tried removing:
ecdh-curve secp384r1

Initial testing indicates it works as expected with N2N connections. If this holds, I will move on to testing road warrior connections with this latest change.

Best regards,
Fred

fkienker
Posts: 126
Joined: March 3rd, 2011, 4:59 pm

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by fkienker » May 24th, 2019, 12:38 pm

The N2N connections continue to work fine with the removal of the ecdh-curve line. One comment - with the removal of ecdh-curve connections have gone from nearly instantaneous to 4 to 5 seconds at start up. I suspect without specifying the ecdh-curve to be used, it has to be negotiated which takes some extra time. Because of the delay, the OpenVPN web page doesn't update automatically and has to be refreshed to see the connection. Not a problem for me once I figured out what was happening, but it might be for some.

Happy to report road warrior laptop and desktop connections seem unaffected by this change as well. I will have to check with them to find out if they are seeing this same connection delay as the N2N connections.

Initial reports from smartphone/tablet users have been good with no complaints so far. As it turns out, everyone thought they needed this but they actually use it far less than they anticipated. A quick check showed very light usage of VPN connections. When we officially started supporting SFTP access, it pretty much replaced the need for a VPN connections. A contributing factor may have been the level of expertise required to set up a VPN connection on a smartphone or tablet. Lots of hand-holding to get it set up even if it worked fine after that.

Best regards,
Fred

ummeegge
Community Developer
Community Developer
Posts: 5001
Joined: October 9th, 2010, 10:00 am

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by ummeegge » May 24th, 2019, 2:42 pm

Thanks Fred,
really good infos. If you don´t mind, can you may check what different ciphers are in usage with a e.g.

Code: Select all

grep -o 'Control Channel:.*' /var/log/messages | sort -nu
?

Again thanks a lot for your testings.

Best,

UE
Image
Image

fkienker
Posts: 126
Joined: March 3rd, 2011, 4:59 pm

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by fkienker » May 24th, 2019, 3:04 pm

I polled the three firewalls I am using for testing.

FW1:
Control Channel: TLSv1.2, cipher TLSv1.2 ECDHE-RSA-CHACHA20-POLY1305, 2048 bit RSA

FW2:
Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, 2048 bit RSA

FW3:
Control Channel: TLSv1.3, cipher TLSv1.3 TLS_CHACHA20_POLY1305_SHA256, 2048 bit RSA

It could be FW1 is using a different cypher because it is primarily used by road warriors running Windows 7 and 10 and smartphones. The other two are N2N systems with all the firewalls running IPFire C131.

Best regards,
Fred

ummeegge
Community Developer
Community Developer
Posts: 5001
Joined: October 9th, 2010, 10:00 am

Re: OpenVPN - Say goodbye to --dh and hello to --ecdh-curve ?

Post by ummeegge » May 26th, 2019, 3:50 pm

Hi Fred,
good to see how that works on your side, also the usage of TLSv1.3 on N2N connections looks a kind of nice in my opinion :-).

OK, just to go one step further (brainstorming). Have meanwhile pushed some changes causing OpenVPN CGI --> https://lists.ipfire.org/pipermail/deve ... 05816.html which will reorganize the crypto section in the WUI. There was already the idea to open up a new crypto box in the WUI for extended settings like it is organized in the IPSec CGI but am asking myself what should there be provided what makes life really better ?

What can be in there (with cons from my side):
- tls-cipher selection (disables the negotiation of the control channel cipher logic in OpenVPN).
- Key exchange algorithms (might it be better to have a simple menu DH-RSA or DH-EC).
As you pointed out there are 4-5 secs more time needed (which is here not recognizable but have also less users) for the key exchange but bothering the user with names llike

Code: Select all

secp192k1
secp224k1
secp224r1
secp256k1
secp384r1
secp521r1
prime192v1
prime192v2
prime192v3
prime239v1
prime239v2
prime239v3
prime256v1
brainpoolP224t1
brainpoolP256r1
brainpoolP256t1
brainpoolP320r1
brainpoolP320t1
brainpoolP384r1
brainpoolP384t1
brainpoolP512r1
brainpoolP512t1
might also be problematic even some curves also do not work for older OpenSSL libs so might it not be better to use there the negotiation between the systems ?
- ncp-cipher and the user choice of the cipher sequence, "AES-256-GCM:AES-128-GCM:AES-256-CBC" is the default, hardcoding of cipher is evil ;-) but in some circumstances may also not that bad or in other words what else should a user configure for better results even all 64bit block ciphers only transfers 64MB data until a new key exchange {SWEET32} ?).

May there are some other points on a potential wishlist ? In general, ideas do have i forgot something ?

For this topic:
- I really want to get the DH-parameter out of the PKi generation cause it needs really really long to generate while some weak systems collapse by a dhparam of 4096 bit .
- The security aspect with ecdh-curves is even better in my opinion and are already used by ~80-90% of the users.
- The compatibility aspect, at the first glance, would be less then before but can be intercepted via a menu where DH-RSA can nevertheless be selected and the already existing upload possibility of DH-parameter can be left where it is so possible mbed TLS builds or OpenSSL < 1.0.1 are not out of the game but would need more steps to configure.

Am i overseeing something ? Any ideas, critics or even better ideas ?

Best,

UE
Image
Image

Post Reply