Configuration file name and location of keys?

Need help configuring your VPN? Just post here and you'll get that help.

Moderators: TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech, TinCanTech

Forum rules
Please use the [oconf] BB tag for openvpn Configurations. See viewtopic.php?f=30&t=21589 for an example.
Post Reply
BobAGI
OpenVPN Power User
Posts: 167
Joined: Mon May 05, 2014 10:17 pm

Configuration file name and location of keys?

Post by BobAGI » Thu Oct 19, 2017 8:50 am

I have set up a few OpenVPN servers on Raspberry Pi over the years.
Now I aim to also set up OpenVPN on a Windows Server 2016 and I thought I could use the same basic method as on the Linux machine.
But I am confused about the configuration file for the server...
After I installed the latest version 2.4.4 on the Windows server and went looking it seems like the server works differently than the 2.2.1 I have on Raspberry Pi.
On the Pi the configuration is in /etc/openvpn/server.conf but on the new 2.4.4 it seems to be in C:\Program Files\OpenVPN\config\server.ovpn

Is this file name change a difference between 2.2.1 and 2.4.4 or is it between Linux and Windows?

In the Windows HOWTO on the openvpn site I see another difference:
Here the location of the server config seems to be suggested as C:\Program Files\OpenVPN\easy-rsa\server.ovpn

This is really confusing, exactly where should the configuration be stored and is it really supposed to be an ovpn file (which I always assumed was a client config and certificate file)?

Certificates and keys location
Another similar issue is the location of the certificates and keys.
On my RPi installations these are in /etc/openvpn/keys, and they were copied there from another location where they were prepared below the easy-rsa directory.
Now when working on the Windows side I find that easy-rsa is part of the OpenVPN installation so it is located in C:\Program Files\OpenVPN\easy-rsa with the keys in subdirectory C:\Program Files\OpenVPN\easy-rsa\keys. And this location is entered into the server.ovpn file according to the HOWTO.
What I have seen now is that the other files like index.txt, with the list of created client logins, is also in the keys directory and therefore accessible by openvpn. On my RPi installations easy-rsa wound up somewhere else and only the certificate files were copied over to the /etc/openvpn/keys directory.
Thus the RPi server has no access to the list of valid clients.
What is the deal here? Should easy-rsa/keys be the ONLY location for the certificates and keys and linked to in the configuration file or should one copy the certificates and keys to a working directory for use by the server?
It has ramifications for the way new clients are added for instance.

Script for building client ovpn files
Finally I also noted that in the dir easy-rsa/keys for Raspberry Pi (Linux) I have a shell-script MakeOVPN.sh to create the client ovpn files, but none was found in the Windows installation. I think it was actually not included in the Linux openvpn installation but added later from the web by me (3 years ago...). But in any case I wonder if there is a similar batch script for Windows available somewhere?
It is really simple to create the stand-alone client ovpn files using this script on Linux. But I cannot find any by googling....

queglay
OpenVpn Newbie
Posts: 4
Joined: Tue Jan 15, 2019 2:34 am

Re: Configuration file name and location of keys?

Post by queglay » Tue Jan 15, 2019 2:35 am

well its been years, but I'm also wondering how to find client.ovpn files on the aws openvpn instance. I want to download them automatically with a shell script so no user interaction would be required.

BobAGI
OpenVPN Power User
Posts: 167
Joined: Mon May 05, 2014 10:17 pm

Re: Configuration file name and location of keys?

Post by BobAGI » Tue Jan 15, 2019 9:07 am

I gave up on OpenVPN server running on Windows Server 2016!
Instead I got a Linux server installed (Ubuntu Server 16.04-3 LTS) in our VMWare ESX system to run the VPN service.
Then there were no such problems, installed and configured in less than an hour.

Post Reply