OpenVPN Connect fails to import valid ovpn file

Post Reply
jafree
OpenVpn Newbie
Posts: 5
Joined: Thu Dec 13, 2018 9:18 am

OpenVPN Connect fails to import valid ovpn file

Post by jafree » Sat Nov 09, 2019 10:13 pm

I created a perfectly valid ovpn file to import onto an iOS phone. I repeatedly got an error that said "file is not UTF8".
I ran it through multiple apps to convert/check it. I used a hex editor to examine the file. Nothing was there except plain text.

Finally, I tried changing the line endings from "Windows" to "Unix". Then the file worked.

So, the error was incorrect. It wasn't reading it because of the line-endings but also, can you please make the client handle CR/LF line endings?

Techie
OpenVpn Newbie
Posts: 4
Joined: Thu Apr 02, 2020 7:14 am

Re: OpenVPN Connect fails to import valid ovpn file

Post by Techie » Wed Apr 08, 2020 10:54 am

Here are some basic pointers for importing .ovpn files:

When you import a .ovpn file, make sure that all files referenced by the .ovpn file such as ca, cert, and key files are in the same directory on the device as the .ovpn file.
Profiles must be UTF-8 (or ASCII) and under 256 KB in size.
Consider using the unified format for OpenVPN profiles which allows all certs and keys to be embedded into the .ovpn file.

Post Reply