Tyson Howard
Cadet
- Joined
- Nov 10, 2014
- Messages
- 6
Any updates on how to get it working now? I'm new to the linux-type enviroment, so forgive me asking, but is there a way to install the older version of easyrsa so I can perform this walkthrough?
Of course I found an answer. It seems that only happens when the common name on the server matches the one on the client. I thought they were supposed to match but apparently they are specifically NOT supposed to match. Hope that helps someone.
Note that in the config for openssl, it has:I'm having issues with the EasyRSA 3 updates.
I get to "easyrsa sign-req server" and I get "signing failed (openssl output above may have more details)" and looking above "AU:invalid type in 'policy' configuration"
Thanks Moo083, that got me through.
I was able to get the auth.key worked out too, but I'm having more trouble getting the revocation list figured out.
It looks like the revocation list details have also changed a bit. I'm having some trouble withe the "crl.pem" either needing special commands to generate, or not being where I thought it should be.
I used "easyrsa revoke <user name>" but it told me I needed to run a gen-crl, which I haven't had much luck with.
Thank you for the help, but I'm still a little confused. Yes, I'm a newbie at this.Create /usr/local/share/easy-rsa/pki/crlnumber with 01 as content, then run gen-crl.
client dev tun proto udp remote SERVERURL SERVERPORT resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert XXXXX.crt key XXXXX.key #tls-auth auth.key 1 remote-cert-tls server comp-lzo verb 3
#!/bin/csh -f ## check if called properly if ($#argv != 1) then echo "Usage: $0 certname" echo "creates and signs a cert for the vpn, then copies it to storage" goto done endif ## save command line args in variables set cert_name=$1 cd /usr/local/share/easy-rsa echo "Starting setup:" echo "Generating keys" easyrsa gen-req $cert_name nopass echo "Signing keys" easyrsa sign-req client $cert_name echo "Copying keys to central store" cp -v pki/private/$cert_name* /mnt/openvpn/keys/ cp -v pki/issued/$cert_name* /mnt/openvpn/keys/ #----------------------------------------------------------------- echo "Creating export package" echo "1. Create directory" mkdir -v /mnt/openvpn/${cert_name}_package echo "2. Copy ca.crt" cp -v /mnt/openvpn/keys/ca.crt /mnt/openvpn/${cert_name}_package/ echo "3. Copy user keys" cp -v /mnt/openvpn/keys/$cert_name* /mnt/openvpn/${cert_name}_package/ echo "4. Create config file" cat /mnt/openvpn/default_package/SERVER-vpn.ovpn | sed -e "s/XXXXX/$cert_name/g" >/mnt/openvpn/${cert_name}_package/SERVER-vpn.ovpn echo "5. Change permissions on export folder" chmod -v -v -R 644 /mnt/openvpn/${cert_name}_package/* echo "Done." ## Labels to jump to exit OK (done) or not OK (error) done: exit 0 error: exit 1
port 10011 proto udp dev tun ca /mnt/openvpn/keys/ca.crt cert /mnt/openvpn/keys/Necronomicon.crt #Server key created previously key /mnt/openvpn/keys/Necronomicon.key dh /mnt/openvpn/keys/dh2048.pem #Diffie-Hellman parameters are now 2048 bits long server 10.8.0.0 255.255.255.0 #Purple network ifconfig-pool-persist ipp.txt push "route 192.168.0.0 255.255.255.0" #Yellow network route 192.168.0.203 255.255.255.0 10.8.0.1 #Routes traffic from the Yellow network side (192.168.0.0/24) #to the Purple network side (10.8.0.0/24) #tls-auth /mnt/openvpn/keys/auth.key 0 #crl-verify /mnt/openvpn/keys/crl.pem keepalive 10 120 group nobody user nobody comp-lzo persist-key persist-tun verb 3 #two factor authenitcation #plugin /usr/local/lib/openvpn/plugins/openvpn-plugin-auth-pam.so login
client dev tun proto udp remote pseudolife.ddns.net 10011 resolv-retry infinite nobind persist-key persist-tun ca ca.crt cert pseudolife.crt key pseudolife.key #tls-auth auth.key 1 #ns-cert-type server remote-cert-tls server comp-lzo verb 3 # Force username & password authenitcation #auth-user-pass # Disable client-side password caching #auth-nocache
if you message me with the output of the "csh add_vpnuser user.name" command, I may be able to help debug it, but you may have hacked a bit too much off ;)This looks like a great addition, but I'm not sure I've got it set-up right. I added the SERVER-vpn.ovpn file into the /mnt/default_package subfolder (I'd created without the openvpn subfolder) and edited the SERVERURL and SERVERPORT to my values.
I added the add_vpnuser.sh file into the /mnt/deafult_package folder and edited the script with the SERVER name and also remove various /openvpn files (as I don't have this subfolder)
When I run the script with csh add_vpnuser user.name it completes and created a /mnt/user.name_package with a SERVER-vpn.ovpn and ca.crt file, but I was expecting to see user.name files in the /mnt/key folder. Looking at it again, it doesn't look like the easyrsa command is running correctly. Any ideas?
Cheers
you could just use ftp to go to the folder, if you have log on as root enabled you won't have any issues with the download then.I'm trying to figure out the step where I move my generated keys to my desktop. What's the preferred method to do this straight from the /mnt/opevpn/keys file? I did cp the folder to my media folder that I have a CIFS share with, but only the client.key file moved. I tried using chmod 644 on the client.crt and the ca.crt, but getting a permissions error. This is the only step I have not figured out before attempting to connect, so any help would be appreciated!
You have SSH enabled right?I'm trying to figure out the step where I move my generated keys to my desktop. What's the preferred method to do this straight from the /mnt/opevpn/keys file? I did cp the folder to my media folder that I have a CIFS share with, but only the client.key file moved. I tried using chmod 644 on the client.crt and the ca.crt, but getting a permissions error. This is the only step I have not figured out before attempting to connect, so any help would be appreciated!