Some common errors and solutions

error parsing certificate : X509 - The date tag or value is invalid This is not a bug in OpenVPN but is because of a faulty certificate. See this detailed forum post for more info. certificate verification failed : x509 - certificate verification failed, e.g. crl, ca or signature check failed This is an error that tells you that the certificate could not be verified properly. This can occur for example if you are using an MD5 signed certificate. With such a type of certificate, the security level is so low, that the authenticity of the certificate simply cannot by any reasonable means be assured. In other words, it could very well be a fake certificate. The solution is to use a certificate not signed with MD5, but with SHA256 or better. You can find more information in the MD5 signature algorithm support section. digest_error: NONE: not usable This can occur if you specify auth none and also tls-auth in your client profile. This occurs because tls-auth needs an auth digest, but none was specified. There's a straightforward fix: just remove the tls-auth directive, since it can't be enabled anyway unless you have anything other but 'none' in the auth directive. SSL - Processing of the ServerKeyExchange handshake message failed There's a good chance this may be related to using older versions of OpenVPN/OpenSSL on the server side. Some users have solved this issue by updating their OpenVPN and/or OpenSSL software on the server side. BIO read tls_read_plaintext error: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher This is usually remedied by going to the OpenVPN Preferences menu and selecting "Force AES-CBC ciphersuites". Also, makes sure you are not using EC certificates as they are not yet supported.

MD5 signature algorithm support

It has been known for a very long time (since 2005 or so) that using MD5 as an algorithm for signing a certificate is a bad idea. It has been shown that with, at the time standard home computer equipment, it took about 8 hours to falsify a certificate signed this way, and as such the identity of the server could be faked. This could lead to an MiTM attack which could lead to interception of traffic. Therefore, MD5 support has been around only to allow connections to older equipment. We discovered that when we tried to cut support in November of 2017 during a security and functionality upgrade of OpenVPN Connect for Android that a lot of people were still using devices that use MD5 signed certificates. This is extremely insecure. It is recommended that any installations that still use MD5 signed certificates are converted to a setup with SHA256 signed certificates, or better. If the device you are using does not offer you the option to do so, then you should try updating the device to add this function if possible, or replace the device with a solution that does support it. We have therefore decided to implement a transitional period in which we will still allow MD5 signed certificates to function, until May 2018, when we will start cutting support for MD5 out of OpenVPN entirely. You should plan accordingly. We have a list of deprecated options and ciphers here: https://community.openvpn.net/openvpn/wiki/DeprecatedOptions To learn why MD5 signatures are bad, see these articles: To determine if you are using an MD5 type certificate now using openssl as testing tool:
openssl x509 -in ca.crt -noout -text | grep "Signature Algorithm"
Example result if certificate is using MD5:
Signature Algorithm: md5WithRSAEncryption
If you see this result on the CA certificate or client certificate, then you must convert to a new and properly secure signed certificate set that uses at least SHA256 or better. For our OpenVPN Access Server users, it is good to know that we do not use MD5 certificate signatures at all in Access Server. For open source OpenVPN users, or users that have a third-party device that includes OpenVPN functionality, and you discover you have MD5 type certificates, you should investigate the option to update the software on your device, or to change the signature algorithm type, if possible. If it is not possible, you could try contacting the manufacturer of your device to see if they still support your device, and if they can create a means by which to replace the certificates with a properly secure type certificate. The default settings of a program like EasyRSA 3, which is used by open source OpenVPN for generating client certificates and keys, are pretty secure and will generate certificate that are not signed with MD5.

When I go to the OpenVPN section of the Settings app, the settings have vanished.

The vanishing settings appear to be a known iOS issue. A suggested workaround is to "quit Settings by double-tapping the home button, and then dragging Settings out of the list of apps. The next time you launch Settings, your app's settings ought to show up."

I am getting the error "mbedTLS: error parsing cert certificate : X509 - The date tag or value is invalid"

This is not a bug in OpenVPN or mbedTLS but is actually caused by incorrectly formatted certificates. See this detailed forum post for more info. From version 1.1.1 the format check has been relaxed to accept also those certificates that were previously rejected with this error.

I am getting the error "Client exception in transport_recv_excode: mbedTLS: SSL read error : SSL - Processing of the ServerKeyExchange handshake message failed".

This may be related to using older versions of OpenVPN/OpenSSL on the server side. Some users have solved this issue by updating their OpenVPN server-side software and/or OpenSSL.

I cannot connect to the server (client times out), and the server log file shows "TLS_ERROR: BIO read tls_read_plaintext error: error:1408A0C1:SSL routines:SSL3_GET_CLIENT_HELLO:no shared cipher".

This is usually remedied by going to the OpenVPN section of the iOS Settings app and selecting "Force AES-CBC ciphersuites". Another reason why this may happen is that you are using EC (Ecliptic Cryptography) certificates. OpenVPN Connect does not support the ECDSA algorithm at the moment, therefore those kind of certificates can't be used.

I am getting the error "digest_error: NONE: not usable"

This can occur if you specify auth none and also tls-auth in your client profile. This occurs because tls-auth needs an auth digest, but none was specified. There's a straightforward fix: just remove the tls-auth directive, since it can't be enabled anyway unless you have a non-none auth directive.

Can OpenVPN profiles be connected from the Settings App?

A: Yes, starting with iOS 8. Note that, if you are using 1.2.5 or older, only autologin profiles (i.e. profiles that don't require credential entry) can be launched using this mechanism. Starting with version 1.2.6, also profiles using a PKCS#12 bundle stored in the iOS keychain can be connected from the Settings.

Is OpenVPN Connect for iOS vulnerable to Heartbleed?

A: No, all versions of OpenVPN Connect for iOS use the mbedTLS library, which is immune to Heartbleed.

Does OpenVPN Connect support the tls-crypt option?

A: Yes, OpenVPN Connect supports the tls-crypt option starting with version 1.2.5

Are CRLs (certificate revocation lists) supported?

A: Yes, CRLs are supported starting with version 1.0.5 for iOS. To use a CRL, it must be added to the .ovpn profile, such as:
<crl-verify>
 -----BEGIN X509 CRL-----
 MIHxMFwwDQYJKoZIhvcNAQEEBQAwFTETMBEGA1UEAxMKT3BlblZQTiBDQRcNMTQw
 NDIyMDQzOTI3WhcNMjQwNDE5MDQzOTI3WjAWMBQCAQEYDzIwMTQwNDIyMDQzOTI3
 WjANBgkqhkiG9w0BAQQFAAOBgQBQXzbNjXkx8+/TeG8qbFQD5wd6wOTe8HnypQTt
 eELsI7eyNtiRRhJD3qKfawPVUabSijnwhAPHfhoIOLKe67RLfzOwAsFKPNJAVdmq
 rYw1t2eucHvGjH8PnTh0aJPJaI67jmNbSI4CnHNcRgZ+1ow1GS+RAK7kotS+dZz9
 0tc7Qw==
 -----END X509 CRL-----
 </crl-verify>
Multiple CRLs may be concatenated together within the crl-verify block above. If you are importing a .ovpn file using iTunes that references an external CRL file such as
crl-verify crl.pem
make sure to drop the file crl.pem into the same place as the .ovpn file during import, so the profile parser can access it.

I am having trouble importing my .ovpn file.

A: Here are some basic pointers for importing .ovpn files:

My profile that worked fine in 1.0.0 stopped working in 1.0.1 or higher, causing "TLS Error: incoming packet authentication failed from [....]" errors on the server. How to fix?

A: In 1.0.1, the default value for the key-direction directive was changed to "bidirectional" for compatibility with the OpenVPN 2.x branch (in 1.0.0, the default was "1"). In general, profiles imported before upgrading should continue to work, because the previous default is retained for such profiles, however if you are importing a new profile in unified format, be sure to follow the updated FAQ entry above for setting the key-direction directive. Also note that for iOS VPN-on-Demand profiles, it is necessary to specify the key-direction as a key-value setting, if it is "0" or "1". This could potentially cause breakage in VPN-on-Demand profiles previously imported with 1.0.0 if they don't declare a key-direction key/value pair on the assumption that it defaults to "1". The solution is to explicitly declare key-direction in VPN-on-Demand profiles if the OpenVPN configuration file they are derived from declares it as well.

Where are the support forums for OpenVPN Connect?

A: https://forums.openvpn.net/

Is IPv6 supported?

A: Yes. The OpenVPN app supports IPv6 transport and IPv6 tunnels as long as the server supports them as well.

How to make IPv6 routing work on iOS 7?

There is a known issue where IPv6 tunnel routes may not be added to the routing table on iOS 7.0.x. This issue was fixed in iOS 7.1 Workaround: use redirect-gateway instead of pushing specific IPv6 routes. For example, in the server configuration file:
push "redirect-gateway ipv6"
Or the client configuration file:
redirect-gateway ipv6
Note that iOS 7 and higher requires that if redirect-gateway is used, that it is used for both IPv4 and IPv6 as the above directive accomplishes.

Why does the VPN disconnect when I make or receive a voice call?

A: Some cellular networks are incapable of maintaining a data connection during a voice call. If iOS detects this as a loss of network connectivity, the VPN should enter a pause state during the duration of the call, and automatically resume after the call is complete. However if the loss of data connectivity isn't detected by iOS, the VPN connection may time out and disconnect.

Given that mobile devices are easily lost or stolen, how best to secure VPN profiles against compromise if the device falls into the wrong hands?

Is it safe to save passwords?

A: Yes, if you have set up a strong device-level password. The app stores authentication and private key passwords in the iOS Keychain, which in turn is protected by the device-level password. Note that the iOS Keychain is accessible by the app only after the user has unlocked the device at least once after restart. For this reason a profile requiring a password to connect won't be able to do so automatically after restart.

After updating my app the certificate list is empty! Why?

A: Starting with OpenVPN Connect v1.2.5, the app has restricted access to the iOS keychain. This is a policy enforced by Apple in order to improve security and avoid a generic app to access unauthorized key/certificates. For this reason PKCS#12 bundles have to be re-imported by OpenVPN Connect directly. Please refer to the FAQ "How do I use a client certificate and private key from the iOS Keychain?" for detailed instructions about how to do so.

Why is the save password switch sometimes disabled?

A: The save password switch on the authentication password field is normally enabled, but can be disabled by the following:

If my OpenVPN profile uses redirect-gateway, does that guarantee that all of my network traffic will be routed through the VPN tunnel?

A: Yes, but with some important exceptions:

How to make the app work with profiles that lack a client certificate/key?

A: If you have a profile that connects to a server without a client certificate/key, you will need to add the following directive to your profile:
setenv CLIENT_CERT 0
This is necessary to resolve an ambiguity when the profile contains no client certificate or key, because otherwise the client app can't know whether an external certificate/key pair should be obtained from the iOS Keychain, or whether the server actually doesn't require a client certificate/key (for example if the server is configured with the client-cert-not-required directive). The option is given as a "setenv" to avoid breaking other OpenVPN clients that might not recognize it.

Why doesn't the app support tap-style tunnels?

A: The iOS VPN API supports only tun-style tunnels at the moment. This is a limitation of the iOS platform. If you try to connect a profile that uses a tap-based tunnel, you will get an error that only layer 3 tunnels are currently supported.

Are there any OpenVPN directives not supported by the app?

A: While most OpenVPN client directives are supported by the app, we have made an effort to reduce bloat and improve maintainability by eliminating what we believe to be obsolete or rarely-used directives. Please email us at ios@openvpn.net if you believe that a specific directive that is not included should be reconsidered for inclusion. Here is a partial list of directives not currently supported: Additional not supported options can be seen in the connection log under the section "UNUSED OPTIONS", where OpenVPN Connect will print all those directives specified in the profile that are not used by the app.

Can I have multiple profiles?

A: Yes, you can import any number of profiles using iTunes, Safari, or Mail as described in the previous help page. Keep in mind that OpenVPN will assign a name to a profile based on the server that the profile connects to. You can always change the name by renaming it after import. Touch the Profile row to select, rename, or delete a specific profile.

How do I delete a profile?

A: Touch the Profile row to bring up the Select Profile page. Touch the Delete link in the upper-right corner. This will cause red "-" icons to appear to the left of all profiles. Touch the "-" icon to actually delete a profile.

How do I rename a profile?

A: Touch the Profile row to bring up the Select Profile page, then select the profile you wish to rename by touching it. Touch the Rename link in the upper-right corner. This will cause the profile name to become editable. Pressing "Done" on the soft keyboard will save the change.

How do I configure OpenVPN to connect via an HTTP proxy?

A: Go to the Settings App and select OpenVPN in the left pane. All proxy options are available here. Proxy options can also be specified in the OpenVPN profile itself using the http-proxy and http-proxy-option directives.

How do I use a client certificate and private key from the iOS Keychain?

A: Using the iOS keychain to store your private key has the added security advantage of leveraging on the hardware-backed keystores that exist on many iOS devices, allowing the key to be protected by the iOS-level device password, and preventing key compromise even if the device is rooted. If you already have your client certificate and private key bundled into a PKCS#12 file (extension .p12 or .pfx), you can import it into the app private section of the iOS Keychain using Mail, Safari or iTunes. Note sure that the file extension has to be changed to .ovpn12 for the file to be picked up by the OpenVPN Connect App (and not by iOS). Note that on iOS, when you import a PKCS#12 file into the Keychain, only the client certificate and private key are imported. The CA (certificate authority) certificates are NOT imported (unless you manually extract the CA certificates and import them separately, one-at-a-time). Therefore, the CA list must be given in the profile using the ca directive. If you already have a PKCS#12 file, the CA list may be extracted from the file using this openssl command, where the CA certs in client.p12 are written to ca.crt:
openssl pkcs12 -in client.p12 -cacerts -nokeys -out ca.crt
Then add a reference to ca.crt to your profile:
ca ca.crt
or paste the contents of ca.crt directly into your profile:
<ca>
paste contents of ca.crt here
</ca>
If you don't have a PKCS#12 file, you can convert your certificate and key files into PKCS#12 form using this openssl command (where cert, key, and ca are your client certificate, client key, and root CA files).
openssl pkcs12 -export -in cert -inkey key -certfile ca -name MyClient -out client.ovpn12
Then import the client.ovpn12 file from the previous step into the app using Mail or Safari. Once this is done, remove the cert and key directives from your .ovpn file and re-import it, making sure that the ca directive remains. Once imported, any profile that lacks cert and key directives will cause a Certificate row to appear on the main view, allowing the profile to be linked with an Identity from the iOS Keychain (on iOS, an Identity refers to a certificate/private-key pair that was previously imported using a PKCS#12 file). Touch the Certificate row and select the MyClient certificate. At this point, you should be able to connect normally. Note that the iOS Keychain is accessible by the app only after the user has unlocked the device at least once after restart. For this reason a profile requiring a certificate stored in the Keychain to connect won't be able to do so automatically after restart. This is a security measure to prevent an unknown person to access a VPN network using a device that was previously switched off.

How do I delete an imported PKCS#12 file?

Starting with 1.2.6 PKCS#12 files are now imported in the iOS keychain as OpenVPN Connect specific key material. For this reason they are not visible in the iOS Settings. To delete an imported PKCS#12 file touch Manage Certificates (or Certs on iPhones/iPods) at the top of the main app screen and then touch Delete. This will cause red "-" icons to appear to the left of all PKCS#12 files. Touch the "-" icon to actually delete a file.

When I try to import a PKCS#12 file, why am I being asked for a password?

A: When you generate a PKCS#12 file, you will always be asked for an "export password" to encrypt the file. This password must again be presented when the PKCS#12 file is imported into the iOS Keychain. This is to prevent interception and recovery of the private key during transport.

When I try to import a PKCS#12 file, why am I being asked for a password even if I haven't set any?

A: When you import a PKCS#12 a password must always be specified. If you have set an empty password, just tap OK without entering any text.

Why doesn't the PKCS#12 file in my OpenVPN configuration file work the same as on desktop systems?

A: PKCS#12 files on iOS are used somewhat differently than on desktop versions of OpenVPN. In desktop versions, PKCS#12 files can be bundled or referenced in the OpenVPN profile. On iOS, however, PKCS#12 management is built into the iOS Keychain. This approach is much better from a security perspective, because the Keychain can then leverage on hardware features in the device such as hardware-backed keystores. However, it does require that the PKCS#12 file is loaded into the iOS Keychain as a separate step from importing the OpenVPN profile. It also moves the responsibility for managing PKCS#12 files to the iOS Keychain, and away from OpenVPN, so it can potentially introduce compatibility issues. To use a PKCS#12 file on iOS, see the FAQ item above: How do I use a client certificate and private key from the iOS Keychain?

After importing my PKCS#12 file into the iOS Keychain, I am getting an error when I try to connect: "mbedTLS: ca certificate is undefined"

A: This error can occur if you don't include a ca directive in your profile, since the iOS Keychain does not provide the CA list from the PKCS#12 file to OpenVPN. The solution is to extract the CA list from the PKCS#12 file and add it to your profile via the ca directive. This is discussed in detail in the FAQ item above: How do I use a client certificate and private key from the iOS Keychain?

Can an OpenVPN server push proxy settings to an iOS device?

A: Yes. An OpenVPN server can push HTTP and HTTPS proxy settings to an iOS client such that these settings will be used by Safari (or other iOS browsers) during the duration of the VPN session. For example, suppose that you are managing an OpenVPN Server and want iOS clients, after they connect, to use an HTTP/HTTPS proxy at 10.144.5.14 port 3128. You could add the following directives to the OpenVPN server-side configuration to push these settings to clients:
push "dhcp-option PROXY_HTTP 10.144.5.14 3128"
push "dhcp-option PROXY_HTTPS 10.144.5.14 3128"
Suppose also that you want several web domains to connect directly (example1.tld, example2.tld, and example3.tld), without going through the proxy:
push "dhcp-option PROXY_BYPASS example1.tld example2.tld example3.tld"
If your site uses a Proxy Autoconfiguration URL, you can specify the URL as follows:
push "dhcp-option PROXY_AUTO_CONFIG_URL http://example.tld/proxy.pac"
If you don't want to (or can't) modify the OpenVPN server configuration, you can also add proxy directives directly to the client .ovpn profile, by simply removing the enclosing push "..." from the directive:
dhcp-option PROXY_HTTP 10.144.5.14 3128
dhcp-option PROXY_HTTPS 10.144.5.14 3128
In some cases, if you push proxy options, it may also be necessary to push a DNS server address as well:
push "dhcp-option DNS 1.2.3.4"
Note that this feature controls application proxy use over the VPN tunnel and is not related to the connection proxy capability of OpenVPN to connect to a server through an HTTP proxy. The connection proxy capability is a separate feature that is accessed through the Settings App under OpenVPN or by using the http-proxy and http-proxy-option directives.

How does iOS interpret pushed DNS servers and search domains?

A: On a split-tunnel, where redirect-gateway is not pushed by the server, and at least one pushed DNS server is present: For example, the following directive on the server will tell the client to route all DNS requests to 172.16.0.23:
push "dhcp-option DNS 172.16.0.23"
while these directives on the server will only route foo.tld and bar.tld DNS requests to 172.16.0.23:
push "dhcp-option DNS 172.16.0.23"
push "dhcp-option DOMAIN foo.tld"
push "dhcp-option DOMAIN bar.tld"
Note that with redirect-gateway, the above discussion is moot, since all DNS requests are always routed through the VPN regardless of the presence or absence of added search domains.

Can I push IPv6 DNS servers to my clients?

A: Yes, you can push an IPv6 DNS by using the same format used for IPv4 ones. For Example:
push "dhcp-option DNS 2001:abde::1"

How do I set my own local domain for automatic resolution?

A: when trying to resolve a PQDN (Partly Qualified Domain Name), the iOS DNS subsystem first tries to solve the hostname as provided and, in case of failure, concatenates it with the system domain prefix (normally assigned by your uplink gateway, for example: ".lan"). In order to specify a different domain to append, the server can push a special directive including the new name:
push "dhcp-option ADAPTER_DOMAIN_PREFIX foo.tld"
Note that this can work only when redirect-gateway or a VPN specific DNS has been configured. See the previous FAQ "How does iOS interpret pushed DNS servers and search domains?" to learn how to specify a DNS.

How do I set up my profile for server failover?

A: You can provide OpenVPN with a list of servers to connect to. On connection failure, OpenVPN will rotate through the list until it finds a responsive server. For example, the following entries in the profile will first try to connect to server A via UDP port 1194, then TCP port 443, then repeat the process with server B. OpenVPN will continue to retry until it successfully connects or hits the Connection Timeout, which can be configured in the Preferences.
remote server-a.example.tld 1194 udp
remote server-a.example.tld 443 tcp
remote server-b.example.tld 1194 udp
remote server-b.example.tld 443 tcp

What is the meaning of the various OpenVPN settings in the iOS Settings App?

UI Settings

Connection Settings

Advanced Settings

Proxy Settings and Credentials

Can I import an OpenVPN profile via an iOS .mobileconfig file?

A: Yes, OpenVPN profiles can be created using the iPhone Configuration utility and exported to a .mobileconfig file, which in turn can be imported onto one or more iOS devices. Unfortunately, the process is a bit cumbersome at the moment because the directives of the OpenVPN profile must be manually entered as key/value pairs into the iPhone Configuration utility UI. To create a .mobileconfig-based profile, open the iPhone Configuration utility, go to the File menu, and select "New Configuration Profile" (note that these directions were tested with version 3.5 of the iPhone Configuration utility on a Mac tethered to an iPad Air running iOS 7.0.4). Next, edit the newly created Configuration Profile. Click on General in the left pane and fill out the fields such as Name, Identifier, Organization, etc. Click on VPN in the left pane and a "Configure VPN" dialog box should appear in the main window. Click the "Configure" button. Fill out the VPN settings as described below: Parameters normally given in the OpenVPN client configuration file must be defined using key/value pairs in the Custom Data section: Once the profile has been defined, you have two options for exporting it to an iOS device: When an iOS device receives an OpenVPN .mobileconfig profile (via Mail attachment, Safari download, or pushed by the iPhone Configuration utility), it will raise a dialog box to facilitate import of the profile. After import, the profile will be visible in OpenVPN.

Can I use iOS 6+ VPN-On-Demand with OpenVPN?

A: Yes. VPN-On-Demand (VoD) is a new technology introduced by Apple in iOS 6 that allows a VPN profile to specify the conditions under which it will automatically connect. In addition, using a VoD profile on iOS 7 allows OpenVPN to be connected and disconnected using the iOS Settings App under the VPN tab (although note that on iOS 8 and higher, ordinary OpenVPN profiles can be connected using the Settings App, as long as they don't require credential entry). OpenVPN on iOS fully supports VoD, with the following features: OpenVPN VoD profiles can be created using the iPhone Configuration utility. Unfortunately, the process is a bit cumbersome at the moment because the directives of the OpenVPN profile must be manually entered as key/value pairs into the iPhone Configuration utility UI. For now, to create a VoD profile, open the iPhone Configuration utility (these directions were tested with version 3.5 on a Mac tethered to an iPad running iOS 6.0.1), go to the File menu, and select "New Configuration Profile". Next, edit the newly created Configuration Profile. Click on General in the left pane and fill out the fields such as Name, Identifier, Organization, etc. Click on VPN in the left pane and a "Configure VPN" dialog box should appear in the main window. Click the "Configure" button. Fill out the VPN settings as described below: In addition, parameters normally given in the OpenVPN client configuration file may instead be defined using key/value pairs in the Custom Data section: Once the VoD profile has been defined, you have two options for exporting it to an iOS device: When an iOS device receives a VoD profile (via Mail attachment, Safari download, or pushed by the iPhone Configuration utility), it will raise a dialog box to facilitate import of the profile. After import, the profile will be visible in the Settings App under General / Profiles. It will also be visible as a profile in the OpenVPN app. Note that the profile must be the currently-enabled VPN profile in order for the VoD functionality to work.

I am a developer. How can I detect if OpenVPN Connect is installed?

OpenVPN Connect 1.0.6 and higher installs the openvpn:// URL scheme and can be detected with the following code:
BOOL installed = [application canOpenURL:[NSURL URLWithString:@"openvpn://"]];

How can I contact the developers about bugs or feature requests?

A: Send email to ios@openvpn.net or open a ticket on our bug tracker (registration required). When opening a ticket, please select "OpenVPN Connect" in the component drop-down menu.