OpenVPN FreeNAS BSD安装问题

时间:2013-12-24 11:04:14

标签: freebsd openvpn

我按照本指南在FreeNAS系统上安装OpenVPN。 http://joepaetzel.wordpress.com/2013/09/22/openvpn-on-freenas-9-1/

我在尝试创建CA.cert时遇到了下面详述的问题。

[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/easyrsa/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.

我已经尝试手动创建密钥目录,因为我已经读过这对其他人有效,但仍然没有运气。作为BSD的新手,我遇到了障碍,并寻求一些建议。

有什么想法吗?

欢呼人们

更新:

当尝试获取./vars时,我得到以下输出

[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.

2 个答案:

答案 0 :(得分:1)

FreeNAS的默认shell不是sh,因此不支持'export'命令。 ./vars脚本需要export命令来设置它需要的环境变量。

因此,在致电./vars(不要致电来源)之前,请致电:

sh

网站上明确说明了这一点:http://joepaetzel.wordpress.com/2013/09/22/openvpn-on-freenas-9-1/

答案 1 :(得分:1)

对原始问题不确定,我认为nrathaus已经做得很好。

demonLaMagra - 如果你想检查运行中的openvpn是否使用此命令:

service openvpn status

抱歉,由于是新用户,我无法对最后一个答案发表评论,否则我会有。