Can't import .ovpn file into OpenVPN Connect (iOS) using Mail

Official client software for OpenVPN Access Server and OpenVPN Cloud.
Post Reply
bwanajag
OpenVpn Newbie
Posts: 6
Joined: Sun Mar 26, 2017 4:21 am

Can't import .ovpn file into OpenVPN Connect (iOS) using Mail

Post by bwanajag » Thu Sep 14, 2017 5:23 am

My ovpn is setup and I'm able to connect with my Mac, but I want to also connect with iOS devices. Since iTunes no longer has the ability access apps on devices (as of 13 Sep 2017; v 12.7), the only way I know to import a .ovpn file is by emailing it and then selecting the .ovpn file in the Mail app on my iOS device. When I do that, I get the following error

"Missing/bad file : ta.key : cannot open for read: /var/mobile/Containers/Data/Application/..."

How do I correctly import the .ovpn into the OpenVPN Connect app on iOS?

Image

bwanajag
OpenVpn Newbie
Posts: 6
Joined: Sun Mar 26, 2017 4:21 am

Re: Can't import .ovpn file into OpenVPN Connect (iOS) using Mail

Post by bwanajag » Thu Sep 14, 2017 11:07 am

I found a solution:

I removed the line "tls-auth ta.key 1", and I moved the line "key-direction 1" to just above the "<tls-auth>".

tlkidd
OpenVpn Newbie
Posts: 1
Joined: Wed Jul 25, 2018 1:40 am

Re: Can't import .ovpn file into OpenVPN Connect (iOS) using Mail

Post by tlkidd » Wed Jul 25, 2018 1:41 am

Wanted to drop a note and say thanks for the fix. Same problem here.

goqhan
OpenVpn Newbie
Posts: 1
Joined: Mon Apr 20, 2020 3:04 pm

Re: Can't import .ovpn file into OpenVPN Connect (iOS) using Mail

Post by goqhan » Mon Apr 20, 2020 3:05 pm

bwanajag wrote:
Thu Sep 14, 2017 11:07 am
I found a solution:

I removed the line "tls-auth ta.key 1", and I moved the line "key-direction 1" to just above the "<tls-auth>".

It really worked, thanks

tipoti
OpenVpn Newbie
Posts: 1
Joined: Sun Feb 07, 2021 6:04 pm

Re: Can't import .ovpn file into OpenVPN Connect (iOS) using Mail

Post by tipoti » Sun Feb 07, 2021 6:05 pm

bwanajag wrote:
Thu Sep 14, 2017 11:07 am
I found a solution:

I removed the line "tls-auth ta.key 1", and I moved the line "key-direction 1" to just above the "<tls-auth>".
Can you give detail about it? I couldnt understand clearly

nreaction
OpenVpn Newbie
Posts: 1
Joined: Thu Jan 06, 2022 8:20 pm

Re: Can't import .ovpn file into OpenVPN Connect (iOS) using Mail

Post by nreaction » Thu Jan 06, 2022 8:25 pm

The proper way to fix: create inline .ovpn file. You want the .ovpn file to include key and cert info all in 1 file instead of 3 files(p12, ovpn, tls.key).

lcreid
OpenVpn Newbie
Posts: 2
Joined: Sun Mar 24, 2024 5:48 pm

Re: Can't import .ovpn file into OpenVPN Connect (iOS) using Mail

Post by lcreid » Sun Mar 24, 2024 5:52 pm

I commented out these lines from the _client_ config file before generating the

Code: Select all

.ovpn
file:

Code: Select all

# ca ca.crt
# cert client.crt
# key client.key
I suspect that the Macos client looks for the files on the Mac, even though they're included in the

Code: Select all

.ovpn
file. And by commenting those lines out, it only looks for the keys in the

Code: Select all

.ovpn
file.

Post Reply