# How do I create an .openvpn file?



## Amitz (Oct 2, 2013)

Dear all,

I have installed OpenVPN on one of my idle VPS servers using Nyr's nice script:

https://github.com/Nyr/openvpn-install

That script generates a username.tar.gz file containing the following files:

username.conf

username.crt

username.key

ca.cert

I would like to provide access to friends that are using "OpenVPN Connect".

http://openvpn.net/index.php/access-server/download-openvpn-as-sw/357.html

OpenVPN Connect requires a .openvpn file that is - in the end - just a textfile containing the necessary information. But I fail when trying to complile the abovementionned files to "username.ovpn".

Is there any tool for automation? Or could someone please give me a forceful hit on the head to improve my thinking?

Thank you very, very much in advance!

Kind regards

Amitz


----------



## Cloudrck (Oct 2, 2013)

It's just a text configuration file, the filename is irrlevant if you're using Unix. I use .ovpn, it doesn't matter. I have no experience with this on Windows.

https://github.com/OpenVPN/openvpn/blob/master/sample/sample-config-files/client.conf

You never mentioned what you "fail" at.


----------



## Amitz (Oct 2, 2013)

Well, it is meant for OSX and Windows users. If I just rename the username.conf to username.ovpn, OpenVPN Connect refuses to open it and does not recognize it as valid configuration file.

The question is: How do I get "OpenVPN Connect" to work with the files that I have?

It works fine with applications like "Tunnelblick", but not with OpenVPN which is mostly used by the friends that I would like to provide with my "service".

Thanks a lot!

A


----------



## nunim (Oct 2, 2013)

http://pastebin.com/VEYYdBws

That's an example user-locked .ovpn file created by OpenVPN-AS, I simply removed the server information.  That is for the default server configuration so if you're only running TCP or UDP etc you will have to make adjustments. 

The best OpenVPN client I have found is SecurePoint OpenVPN it allows you to plugin the certificates and key files then creates a profile for you, it can also import .ovpn files.



https://docs.google.com/document/d/1bMFRenDji2KlXif1CIq_7v7H-Iy7KP38m7IhQsZqS5I/edit?pli=1

This page should be helpful as well, you would just need to change the servers from asu.edu to your own.

You can also checkout the OpenVPN config man page, it's a bit lengthy but has all the information you'd ever need - https://community.openvpn.net/openvpn/wiki/Openvpn23ManPage


----------



## kro (Oct 2, 2013)

Yeah, OSX users should be using tunnelblick i believe, and the config is slightly different, some of the options you would use traditionally break the configuration files etc, Just start with a minimal as config and build on top with your common .ovpn settings.


For OpenVPN Connect related issues, I found i had to use an inline style config file i think its called. (Specially for these new dumb phones)

<ca>

-----omfg-----

aslkda;lskd

12kle1

;ldk1;

l2k11

;2lkde1

;2lkd

----win------

</ca>

Start with a MIN cert with the certs/ca in the config, and build off that option by option.
Been a while since I've tinkered with OpenVPN ahaha, but I do run a couple of VPN outlets and this is what i vaguely recall


----------



## Amitz (Oct 5, 2013)

Thank you guys...

I will see what I can do now!

Kind regards

A


----------



## Nyr (Oct 7, 2013)

Hey,

Don't know if I'm late to the party, but it's much simpler than most people said:

- For Mac you can use Tunnelblick or Viscosity. Just unpack the .tar.gz and import to the client, no need for any modification.

- For Windows, you can use the OpenVPN community version straight away. Just rename the .conf to .ovpn, and you're set. Don't use OpenVPN Connect, it's meant for the commercial versions.


----------



## Amitz (Oct 7, 2013)

You are not late to the party, you answered all my questions and made me happy. 

Thanks a lot, Nyr!


----------



## Chuck (Jun 18, 2014)

I use the script.

How do I create Username & Password for each user?
Thank you.


----------

