LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-31-2010, 09:17 AM   #1
idlehands
Member
 
Registered: Mar 2010
Distribution: zLinux, RHEL, Ubuntu, SUSE
Posts: 50

Rep: Reputation: 16
OpenVPN thirdpart CA and LDAP


I'm trying to setup OpenVPN to use a third party CA, and its unclear to me how to use the serial and index.txt files that are created when one uses the easy-rsa scripts to setup OpenVPN. If i'm using my own CA can I ignore those? Its also unclear to me how OpenVPN figures out the server.key passphrase.


I'd also like to leverage the --tls-verify cmd directive but I am unsure of where to specify it.

What I would like to do is have --tls-verify call a perl script that then verifies that the CN of the certificate the client is passing in matches a cn in an LDAP group. I figure I can do the LDAP group lookup with some easy perl stuff, its unclear to me though if --tls-verify is going to pass in the RDN of the client cert.

Thanks!
 
Old 03-31-2010, 10:18 PM   #2
beadyallen
Member
 
Registered: Mar 2008
Location: UK
Distribution: Fedora, Gentoo
Posts: 209

Rep: Reputation: 36
You don't need to use the index and serial files for anything. They're only for easy-rsa. If you're using an external CA, just get your server's certificate signed by that CA. Unless you mean you want to use easy-rsa to do the signing, supplying an external certificate. If that's the case, I don't think easy-rsa is really meant for that. I'd do it by hand using openssl (all the commands you need are in the easy-rsa scripts).

You can use 'askpass [filename]' to provide a password for your server's private key. Obviously making sure that 'filename' has suitable permissions. (600 and owned by root)

As for tls-verify, I'm not sure (never used it). From looking at the example 'verify-cn' script it looks like you get the whole lot. The example script then checks the CN with a regex. I guess you could do similar to get whatever you want for the ldap check. I'd just write the script and have it dump some debug output somewhere to check.

Hope that helps.
 
Old 04-01-2010, 07:47 AM   #3
idlehands
Member
 
Registered: Mar 2010
Distribution: zLinux, RHEL, Ubuntu, SUSE
Posts: 50

Original Poster
Rep: Reputation: 16
That helps a bunch! I wasn't sure what those files were used[index serial] for and my googling didn't help. I ended up using easyrsa to generate files, and then just copied the CA(my external CA) roots over the top, and then resigned the server cert. I'll dump out the rest of the files. On the plus side i figured easy-rsa would handle setting up the password on the server's key.

You just described about what I was going to try with the tls-verify. I figured it would be easier to ask first though. I'm going to assume that somehow tls-verify is passing along the CN somehow.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] OpenVPN+dhcpd+ldap Blue_Ice Linux - Server 9 05-14-2010 05:40 AM
OpenVPN client has not default gateway when connect to OpenVPN server sailershen Linux - Security 3 03-04-2010 02:20 AM
How does OpenVPN Linux server issues IP and netmask to OpenVPN clients on Windows XP pssompura Linux - Networking 0 12-24-2009 02:42 AM
Error When converting Routing OpenVPN to bridge mode openvpn danmartinj Linux - Software 0 11-06-2009 09:23 AM
openVPN authentication in LDAP deibertine Linux - Server 1 10-25-2009 04:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 09:11 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration