[FreeNAS] OpenVPN install issues

Hey guys, im I'm following this guide to install OpenVPN on my FreeNAS server http://joepaetzel.wordpress.com/2013/09 ... eenas-9-1/

I have run into the issues detailed below when trying to create the CA.cert.

Code:
[root@freenas] /mnt/NAS/openvpn# chmod -R 755 easy-rsa/2.0/*
[root@freenas] /mnt/NAS/openvpn# cd easy-rsa/2.0
[root@freenas] /mnt/NAS/openvpn/easy-rsa/2.0# sh
# ./clean-all
Please source the vars script first (i.e. "source ./vars")
Make sure you have edited it to reflect your configuration.
# . ./vars
NOTE: If you run ./clean-all, I will be doing a rm -rf on /mnt/NAS/openvpn/easy-rsa/2.0/keys
# ./build-ca
Please edit the vars script to reflect your configuration,
then source it with "source ./vars".
Next, to start with a fresh PKI configuration and to delete any
previous certificates and keys, run "./clean-all".
Finally, you can run this tool (pkitool) to build certificates/keys.

I have tried creating the keys directory manually as i've I've seen this has worked for some but still get the same output.

Any ideas will be appreciated.

cheers
Dan

UPDATE:

when trying to source ./vars i get the following.

Code:
[root@freenas] /mnt/NAS/openvpn/easy-rsa/2.0# source ./vars
export: Command not found.
export: Command not found.
export: Command not found.
export: Command not found.
EASY_RSA: Undefined variable.
export: Command not found.
EASY_RSA: Undefined variable.
 
It is not about breaking rules (though we advise you read all of them), it is about understanding that any advice given here might render your FreeNAS installation unusable. Hence disclaimer.
 
Okay :) I understand that :)

I think this is a general BSD question as I gather it is something I'm doing incorrectly in regards to working with BSD. My FreeNAS is not up and running fully yet and I wanted to get this sorted 1st first. If you have any suggestions on the problem I have it would be a great help :) Willing to try anything at the moment, driving me crazy :)
 
Running under sh (as you switched to prior to trying that clean-all), the proper syntax to "source" a file is just like you initially tried; source is the csh equivalent (those errors when you tried the source command tell me that it's expecting you to be doing this running under sh and not csh). It's my guess that the build-ca command couldn't find something that it needed and therefore spit out that message about editing the vars script; I would look at that file and see if there are paths or files listed there that are in a different place on your system, make the appropriate edits, "source" it again, and retry the build-ca.

Good luck.
 
ljboiler said:
Running under sh (as you switched to prior to trying that clean-all), the proper syntax to "source" a file is just like you initially tried; source is the csh equivalent (those errors when you tried the source command tell me that it's expecting you to be doing this running under sh and not csh). It's my guess that the build-ca command couldn't find something that it needed and therefore spit out that message about editing the vars script; I would look at that file and see if there are paths or files listed there that are in a different place on your system, make the appropriate edits, "source" it again, and retry the build-ca.

Good luck.

No luck :( Tried editing the paths in the ./vars file but nothing. Sure doesn't help when you have no experience with BSD.
 
Hey guys, I believe I have succeeded. It was all me doing something wrong :/

How do I confirm my VPN service is working??? Trying ifconfig but I can't make out whether it's working or not.

Cheers.
 
You never said, but I assume you are trying to install an OpenVPN server ? The netstat command ( man netstat for options) can show you what network ports have some service listening for connections; the standard port for OpenVPN is 1194 unless you have changed the configuration.
 
I'm installing OpenVPN to make use of my VPN service. I have managed to get OpenVPN to recognise my configuration file and CA from my VPN service provider but I can't think of a way to see if it's running.

I have run

Code:
netstat
Active Internet connections
Proto Recv-Q Send-Q Local Address          Foreign Address        (state)
tcp4       0      0 freenas.1078           SkyRouter.Home.64595   ESTABLISHED
tcp4       0      0 localhost.9042         localhost.63349        CLOSED
tcp4       0      0 localhost.9042         localhost.55076        CLOSED
but it does not list anything from OpenVPN :(

Cheers
 
The correct command in FreeBSD to list listening sockets is sockstat(1). For example, sockstat -l4 to list listening sockets that are listening for any IPv4 connections.
 
Back
Top