[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

OpenVPN authentication using " user and password" or certificate

Posted on 2015-02-08
15
Medium Priority
?
450 Views
Last Modified: 2015-03-06
I need to authenticate some users in OpenVPN server using " user and password " + certificate authentication, and other some other user can be authenticated using certificates only. Which they can't enter users and passwords.
What the solution for that ? with keeping authentication using passwords available for some users.
How can i add user and password inside openvpn client configuration file. ? not in external file.
0
Comment
Question by:LizaMoly
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 5
15 Comments
 
LVL 83

Expert Comment

by:David Johnson, CD, MVP
ID: 40596894
you will probably need 2 vpn locations. One for each configuration.
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 40597092
One way is to use different OpenVPN servers, e.g. with different port.
You can do with an authentication script running on the server side, checking the certificate and deciding whether to use auth-user-pass, but that is more complex (never done myself).
0
 

Author Comment

by:LizaMoly
ID: 40597697
How can I connect two OpenVPN servers with each other ?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 71

Expert Comment

by:Qlemo
ID: 40597826
Why you would like or need to do that?
0
 

Author Comment

by:LizaMoly
ID: 40598003
I have some clients cannot enter user and password "IP phones ", which support openvpn but not support external files containing username and password. It just only accept certificate authentication. So what the solution to keep handling some users must be authenticated with user and password.
Is there any way to include username and password inside the configuration file ?
I'm thinking now to specify one server for authentication using certificates only, and the other server can authenticate using username and password + certificates.
This is my situation, Any help ??
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 40598284
Reread http:#a40597092, that describes both options. You do not need to "connect two OpenVPN servers with each other", they are independant.
0
 

Author Comment

by:LizaMoly
ID: 40600163
Please Qlemo, correct the link, it's refer to this question.
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 40600176
Exactly - this is intentional, hence the reread.
Probably two servers (OpenVPN processes) on the same machine, but using different ports, is the best option for you.
0
 

Author Comment

by:LizaMoly
ID: 40600418
How can i do that ? How to run two OpenVPN processes?
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 40601838
Like this:
pushd c:\Program Files\OpenVPN
path %PATH%;C:\Program Files\OpenVPN\bin;
start /min "OVPN Cert only" openvpn -config config\server-certonly.ovpn
start /min "OVPN auth" openvpn -config config\server-userpass.ovpn
popd

Open in new window

Each OVPN file contains the appropiate configuration commands.
You might even use two different folders for OpenVPN, to keep everything separated from each other, including CA certs. Keeping the certs different prevents from users deciding they do not need to authenticate, if they gain knowledge how to do that.
0
 

Author Comment

by:LizaMoly
ID: 40603071
Thank you Qlemo for your help, but i use Linux, CentOS 6.5. I need the solution for linux not windows.
0
 
LVL 71

Accepted Solution

by:
Qlemo earned 2000 total points
ID: 40603107
Of course, sorry. But that doesn't change much. Just make sure you use the paths as needed, and start OpenVPN as background job via &. For example
/path/to/openvpn -config /path/to/config/server-cert.ovpn &
/path/to/openvpn -config /path/to/config/server-userpass.ovpn &

Open in new window

Don't know the location of binaries and data in Linux, but that should give you a start.
0
 
LVL 71

Expert Comment

by:Qlemo
ID: 40618509
Why a "B" grade?
0

Featured Post

Are You Ready for GDPR?

With the GDPR deadline set for May 25, 2018, many organizations are ill-prepared due to uncertainty about the criteria for compliance. According to a recent WatchGuard survey, a staggering 37% of respondents don't even know if their organization needs to comply with GDPR. Do you?

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you use NetMotion Mobility on your PC and plan to upgrade to Windows 10, it may not work unless you take these steps.
How to set-up an On Demand, IPSec, Site to SIte, VPN from a Draytek Vigor Router to a Cyberoam UTM Appliance. A concise guide to the settings required on both devices
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question