
If we are to use this server on Windows we have to streamline the generation of the client ovpn files. I think I have to write a non-scripted program (non-Unicode too) to build the ovpn files from the building blocks but where I have better control than in batch scripting. I have no clue as to what is the difference between these files, maybe there are some subtle encoding difference that is invisible to the eye but not to software? Unicode screwing things up maybe? And of course the line endings are different in the new file compared to the old one, WinMerge does not notice this, though. If I now use WinMerge to compare the two files it finds only a single difference, in the non-working file I have added a comment on top explaining what the file purpose is. And this is exactly why I had to use the phone in the first place (to help in debugging the server configuration). Ex:Client.ovpn Create a file named credentials.txt and enter username and password one below the other Ex: john pssw0rd Move the files to the 'config' folder, inside 'OpenVPN' on your computer.

Now there was no complaint anymore about the ca ending and I could start a session, which did not complete because of networking issues on the server side. Save the generated config file with the extension.
#Ovpn file zoogvpn android
Saved the file under a new name and transferred it to the old Android phone, where I imported the profile. I started by copying in Default.txt and so on. Then I have manually typed in the tags and copy pasted the blocks of text from the various cert and key files. Now I have started with a new blank edit window set to UTF-8 without BOM using Ultraedit on Windows.
#Ovpn file zoogvpn how to
I don't know how to change this to a uniform line ending scheme in a Windows bat file, though. So I understand that the echo commands into the file will yield CRLF line endings, but why is this the case for ta.key? My batch script just copies together the files and adds the separation tags (except it uses sed to cut out parts of client.crt). Why the different files created by the scripts in the easy-rsa dierctory should wind up with different types of line endings is beyond me.

So Default.txt, client.crt and ta.key use Windows CRLF line endings as do the lines containing the tags ( etc)īut the ca.crt and use unix LF line endings. The bat file essentially just copies together a set of files as follows:ĭefault.txt (CRLF line endings): contains the client openvpn options that go on top of the ovpn fileĬlient.crt (CRLF line endings): this is filtered through sed to just use the lines between begin and end certificate The client ovpn file was built using a variation of the MakeOVPN.sh file converted to MakeOVPN.bat for Windows.

I have looked more carefully at the ovpn file now and it turns out that parts of the file uses unix line endings (LF) and parts of it Windows line endings (CRLF).
