Adding profiles using command line

How to customize and extend your OpenVPN installation.

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

Post Reply
Alar
OpenVpn Newbie
Posts: 3
Joined: Thu Jul 25, 2013 1:35 pm

Adding profiles using command line

Post by Alar » Thu Jul 25, 2013 1:57 pm

Hi!
Installed openvpn-client.msi (1.5.6 probably latest OpenVPN Client for Windows?). I'm wondering is there a way to get automatically (from command line) added profile using crt and ovpn files?
More thanks, Alar.

User avatar
maikcat
Forum Team
Posts: 4200
Joined: Wed Jan 12, 2011 9:23 am
Location: Athens,Greece
Contact:

Re: Adding profiles using command line

Post by maikcat » Thu Jul 25, 2013 5:05 pm

FYI,

this is the AS version not the community one..

Michael.
Amiga 500 , Zx +2 owner
Long live Dino Dini (Kick off 2 Creator)

Inflammable means flammable? (Dr Nick Riviera,Simsons Season13)

"objects in mirror are losing"

Alar
OpenVpn Newbie
Posts: 3
Joined: Thu Jul 25, 2013 1:35 pm

Re: Adding profiles using command line

Post by Alar » Fri Jul 26, 2013 12:22 pm

Hi and thanks!
Sorry. So, I should stick to it? or is a option to use community version (?) to access? I mean, I tried also VPN portable version and could add profile wo any problem and wo need for user to do something, but ... seems to it does not work as expected, I mean, some connection problems, even I don't see any errors from client side.
More thanks, Alar.

useradmn
OpenVpn Newbie
Posts: 4
Joined: Mon Jul 15, 2013 7:34 pm

Re: Adding profiles using command line

Post by useradmn » Tue Jul 30, 2013 4:04 am

Hi, we're you able to find solution for this? I am looking for solution to setup client profiles as well using community edition.

Alar
OpenVpn Newbie
Posts: 3
Joined: Thu Jul 25, 2013 1:35 pm

Re: Adding profiles using command line

Post by Alar » Tue Jul 30, 2013 11:25 am

Hi!
Well, not sure about community version, but I found a way for msi (1.5.6) I used. My problem - why I asked for info - was I want to setup program for users in mode they need to start it, nothing more, no profile adding etc. (could be complicated for some users). I thought there is a way via command line, but didn't find it for this version. I have Novell ZENworks for managing, so, I installed msi using system-account, remotely. This was/is also my goal to have one bundle make this setup to happen. Firs I had to install it just in silent way, nothing more, to check how it does keep settings etc. So, after msi-install and adding profile (manually, first time) I noticed it does put profile-info into etc\profile directory (nothing seems to set into registry). There appear two files like <given_name>_p0001.info and <given_name>_p0001.ovpn. This <given_name> was profile name. OVPN-file has info about settings and included crt, INFO-file has info about profile naming and owner (! ~ windows user) etc. Btw. both these files - in my environment, at least - were accessible only for system-account, so, if You need to see these files, You need change this. Anyway, now I had those files and installed msi on another device and put these files into directory in question, changed owner (~ user) name in INFO-file and started program and ... voila, profile did appear as should and I could log in. Now I created a bundle (using ZENworks) which does change owner (~ user) name in INFO-file during user login. Because initial install (another bundle) of msi does setup program and put these two files into dir by default settings. Have tried this on two devices, so far, probably more testing needed to say it's ... ok.
Well, on some version of OpenVPN (maybe community one) it should be possible to use command-line, "--config" etc. Not sure it does work, though. As I don't have any server config mastering options ... I must work profiles and directions I have here.
Tried also portable version OpenVPN and there it was easier, I mean, I put ca.crt and <profile>.ovpn into \data\config dir and starting VPN it (profile) appear as should. Not sure it does work ok in my envir, though.
With best,
Alar.

Post Reply