在Windows,Mac和Linux / Unix上运行nba赌钱
我们将为您解决棘手的配置问题,以便您可以使用nba赌钱为Windows,Mac或Unix / Linux系统提供免费的安全网络。
众所周知,nba赌钱很难启动和运行,但事实是它不需要’t be. In this second and concluding nba赌钱 article I am going to go through what it takes to get an nba赌钱 Ethernet tunnel set up between a laptop computer and an office or home machine acting as an nba赌钱 服务器.
下载并安装nba赌钱
在任何计算机上运行nba赌钱之前,您需要下载并安装它:
-
Windows:从以下位置下载nba赌钱 GUI安装包 http://openvpn.se/download.html
-
Red Hat,Fedora,CentOS:从以下位置下载RPM软件包 http://dag.wieers.com/rpm/packages/openvpn/
-
Ubuntu:使用Synaptic Package Manager下载并安装nba赌钱
-
Mac OS X:从以下位置下载并安装Tunnelblick nba赌钱 GUI客户端安装软件包 http://code.google.com/p/tunnelblick/
-
源代码:从下载源代码 http://www.openvpn.net/index.php/downloads.html,编译并安装它。
创建公钥基础结构
一旦您’已经成功安装了nba赌钱,它’是时候构建基于证书的身份验证所需的公钥基础结构了。如果你不这样做’不知道这意味着什么,不要’不用担心:只要按照指示进行即可。可以在以下位置找到更完整的解释 http://openvpn.net/index.php/documentation/howto.html#pki
首先,您’我将需要使用Easy-RSA PKI套件。
在Windows计算机上,您’ll find it at: C:Program Filesnba赌钱easy-rsa
On Linux machines this will probably be installed in an easy-rsa directory machines at /usr/share/doc/packages/opevpn
or /usr/share/doc/openvpn-2.0
, but it’s a good idea to move this to /etc/openvpn
to prevent it getting overwritten by future updates.
生成主证书颁发机构(CA)证书& Key
视窗: From the Start button select cmd
, and in the command window type:
cd "C:Program Filesnba赌钱easy-rsa
Linux / BSD / UNIX:打开终端窗口并输入
cd /etc/openvpn/easy-rsa
(假设您已经将easy-rsa目录移动到了该位置)
然后键入以下命令,然后返回:
视窗:
init-config
vars
clean-all
build-ca
Linux / BSD / UNIX:
./init-config
./vars
./clean-all
./build-ca
The last command will invoke a window which will ask for a series of values. 您 can press the return key to enter the default values for all of these except the value for Common Name. For this, type:
TestVPN
生成服务器和客户端证书和密钥
Then next step is to generate a 服务器 certificate and key, again using the Easy-RSA suite. The command for this is:
- 视窗:
build-key-server 服务器
- Linux / BSD / UNIX:
./build-key-server 服务器
在随后的交互式会话中,只需每次按Enter即可提供默认值,直到要求您输入通用名为止。对于通用名称,请输入“server”,然后继续输入默认值,直到提示您签署证书。回答“y”这个问题,然后再完成下面的一个。
Then generate the certificate and key for your client machine. The process is similar to the one for building the 服务器 certificate and key, but this time enter client1 as the common name.
If you think you may want to access the nba赌钱 服务器 from more than one laptop, repeat the process, replacing client2 or client3 for client1 each time.
- 视窗:
build-key client1
- Linux / BSD / UNIX:
./build-key client1
生成Diffie-Hellman参数
最后一步是生成用于密钥交换的Diffie-Hellman参数:
- 视窗:
build-dh
- Linux / BSD / UNIX:
./build-dh
您’将在easy-rsa文件夹中的名为key的子文件夹中找到所有这些工作的结果,最后的任务是将客户端密钥和证书移至客户端设备。有问题的文件是client1.key和client1.crt。 (如果创建了多个客户端证书密钥和证书,请将client2.key和client2.crt文件移动到第二台计算机上,依此类推。)
- Windows:将文件放在
C:WindowsProgram Filesnba赌钱easy-rsakeys
- Linux / BSD / Unix:将文件放在
/etc/openvpn/
您r public key infrastructure is now set up.
创建nba赌钱配置文件
When nba赌钱 runs it reads a configuration file at c:Program Filesnba赌钱config
(Windows) or in /etc/openvpn
(Linux/BSD/Unix). This text file contains all the information nba赌钱 needs to know to make or receive a connection, so it’这些文件的正确性至关重要。
使nba赌钱以我们想要的方式工作的最简单方法是在以下配置文件中编辑突出显示的行以匹配您的网络设置,将它们另存为文本文件并将其复制到适当的位置。
服务器配置文件:
#server config file start
local 192.168.1.15
# Change this address to the IP address of the network card attached to your router. To ensure this does not change you need either to have a static local IP address, or to configure your router to always assign this local IP address to your 服务器.
port 1194
#这是nba赌钱将在其上运行的端口。如果愿意,可以将其更改为其他端口
proto udp
mssfix 1400
push "dhcp-option DNS XXX.XXX.XXX.XXX"
# Replace the Xs with the IP address of the DNS 服务器 for your network
push "dhcp-option DNS YYY.YYY.YYY.YYY"
# Replace the Xs with the IP address of the secondary DNS 服务器 for your network
dev tap
ca "C:\Program Files\nba赌钱\easy-rsa\keys\ca.crt"
#对于Linux / BSD / Unix系统,将此位置更改为/ etc / openvpn(不带引号)
cert "C:\Program Files\nba赌钱\easy-rsa\keys\server.crt"
#对于Linux / BSD / Unix系统,将此位置更改为/ etc / openvpn
key "C:\Program Files\nba赌钱\easy-rsa\keys\server.key"
#对于Linux / BSD / Unix系统,将此位置更改为/ etc / openvpn
dh "C:\Program Files\nba赌钱\easy-rsa\keys\dh1024.pem"
#对于Linux / BSD / Unix系统,将此位置更改为/ etc / openvpn
服务器 192.168.10.0 255.255.255.128
# This will be the virtual IP address and subnet of the 服务器’s nba赌钱连接。如果此子网已在使用中,请将其更改为类似192.168.11.0的名称
ifconfig-pool-persist ipp.txt
push "redirect-gateway def1"
keepalive 10 120
cipher BF-CBC
#Blowfish(默认)如果愿意,可以使用下面列出的两种密码之一(必须与客户端相同)
#cipher AES-128-CBC # AES
#cipher DES-EDE3-CBC # Triple-DES
comp-lzo
max-clients 3 # Change the 3 to the number of client keys you have created
persist-key
persist-tun
status openvpn-status.log
# user nobody # remove the # at the start of the line for Linux/BSD/Unix systems
# group nobody # remove the first # at the start of the line for Linux/BSD/Unix systems
verb 1
#config file ends
Save this file as 服务器.ovpn
, and move it to c:Program Filesnba赌钱config
(Windows) or /etc/openvpn
(Linux/BSD/Unix)
What to Do If 您 Don’t具有静态公共IP地址
nba赌钱客户端使用需要在客户端配置文件中输入的公共IP地址或主机名连接到nba赌钱服务器。如果您的ISP为您的企业或家庭网络提供了一个动态IP地址,该地址在每次重置Internet连接时都会更改,则您的客户端配置在重新连接后将不再起作用。为了解决这个问题,您可以从DynDNS获得免费的主机名,该主机名会自动指向您的动态IP地址,即使它发生更改也是如此。要获取动态主机名(例如myhost.dyndns.org),请访问 http://www.dyndns.com.