OpenVPN 2.4.9的次要版本,已修复了一些错误

几天前 新版本的OpenVPN 2.4.9已发布,就是这个 纠正版本 推出了 为了纠正漏洞CVE-2.020-11.810, 允许将客户端会话转换为新的IP地址,该地址在此之前尚未注册。

该问题可用于中断新连接的客户端 在已经生成对等标识但会话密钥的协商尚未完成的阶段(客户端可以停止其他客户端的会话)。

关于OpenVPN

对于不熟悉OpenVPN的用户,您应该知道 这是一个基于软件的免费连接工具, SSL(安全套接字层),VPN虚拟专用网。

OpenVPN的 提供点对点连接,对连接的用户和主机进行分层验证 远程地。 在Wi-Fi技术(IEEE 802.11无线网络)中,它是一个很好的选择,并支持广泛的配置,包括负载平衡。

OpenVPN是一种多平台工具,与较早且较难配置的IPsec(例如IPsec)相比,它简化了VPN的配置,并使其对这类技术的新手而言更易于访问。

OpenVPN 2.4.9的新功能是什么?

除了上述错误中的修复程序之外,此新版本还 在验证交互式用户服务的过程中进行了更改 (在Windows上,首先验证配置位置,然后将请求发送到域控制器。)

使用选件时 “-auth-user-pass文件”,如果文件中只有一个用户名要求输入密码,则需要时间来管理凭证的时间 (停止通过控制台提示符使用OpenVPN要求输入密码)。

在Windows平台上,允许在“ –cryptoapicert”选项中使用unicode搜索字符串。

还解决了无法下载多个CRL的问题 在OpenSSL系统上使用“ –crl-verify”选项时,(证书吊销列表)位于同一文件中。

并且在FreeBSD平台上使用–enable-async-push标志已经解决了编译问题。

修复了OpenSSL私钥密码通知 和过期的证书将传递到Windows证书存储。

如何安装OpenVPN?

对于那些对能够在其系统上安装OpenVPN感兴趣的人, 他们可以按照说明进行操作 我们在下面分享。

首先是要安装该工具和Easy RSA 由于要颁发受信任的证书,因此必须配置一个简单的证书颁发机构(CA):

sudo apt update

sudo apt install openvpn easy-rsa

现在 我们将使用以下方式配置证书颁发机构:

make-cadir ~/openvpn-ca

cd ~/openvpn-ca

Y 让我们编辑一些变量 这有助于决定如何创建证书:

gedit vars

查找easy-rsa部分并进行编辑,使其如下所示:

经过一些调整:

# These are the default values for fields

# which will be placed in the certificate.

# Don't leave any of these fields blank.

export KEY_COUNTRY="US"

export KEY_PROVINCE="CA"

export KEY_CITY="Tustin"

export KEY_ORG="SSD Nodes"

export KEY_EMAIL= class="hljs-string">"joel@example.com"

export KEY_OU="Marketing"

# X509 Subject Field

export KEY_NAME="vpnserver"

您保存并在终端中输入:

source vars

./build-ca

将创建一个新的RSA密钥,并要求您确认输入到文件中的详细信息。 做完了 现在是时候创建客户的公钥/私钥了,在[服务器]中放置所需的名称。

./build-key-server [server]

接下来,他们需要构建Diffie-Hellman键。

./build-dh

最后,他们必须生成HMAC签名以增强证书。

openvpn --genkey --secret keys/ta.key

source vars

./build-key client1

Y 如果要创建密码保护的凭据,请执行以下操作:

源变量

./build-key-pass client1

现在我们要配置OpenVPN服务器

cd ~/openvpn-ca/keys

sudo cp ca.crt ca.key vpnserver.crt vpnserver.key ta.key dh2048.pem /etc/openvpn

gunzip -c /usr/share/doc/openvpn/examples/sample-config-files/server.conf.gz | sudo tee /etc/openvpn/server.conf

现在我们需要对配置文件进行一些编辑。

sudo nano /etc/openvpn/server.conf

首先,让我们确保OpenVPN在寻找正确的.crt和.key文件。

先于:

ca ca.crt

cert server.crt

key server.key  # This file should be kept secret

则:

ca ca.crt

cert vpnserver.crt

key vpnserver.key  # This file should be kept secret

然后,我们在客户端和服务器之间应用相同的HMAC。

先于:

;tls-auth ta.key 0 # This file is secret

则:

tls-auth ta.key 0 # This file is secret

key-direction 0

如果您更喜欢使用Opendns以外的DNS, 您必须更改以push«dhcp-option开头的两行。

先于:

# If enabled, this directive will configure

# all clients to redirect their default

# network gateway through the VPN, causing

# all IP traffic such as web browsing and

# and DNS lookups to go through the VPN

# (The OpenVPN server machine may need to NAT

# or bridge the TUN/TAP interface to the internet

# in order for this to work properly).

;push "redirect-gateway def1 bypass-dhcp"

# Certain Windows-specific network settings

# can be pushed to clients, such as DNS

# or WINS server addresses.  CAVEAT:

# http://openvpn.net/faq.html#dhcpcaveats

# The addresses below refer to the public

# DNS servers provided by opendns.com.

;push "dhcp-option DNS 208.67.222.222"

;push "dhcp-option DNS 208.67.220.220"

则:

# If enabled, this directive will configure

# all clients to redirect their default

# network gateway through the VPN, causing

# all IP traffic such as web browsing and

# and DNS lookups to go through the VPN

# (The OpenVPN server machine may need to NAT

# or bridge the TUN/TAP interface to the internet

# in order for this to work properly).

push "redirect-gateway def1"

# Certain Windows-specific network settings

# can be pushed to clients, such as DNS

# or WINS server addresses.  CAVEAT:

# http://openvpn.net/faq.html#dhcpcaveats

# The addresses below refer to the public

# DNS servers provided by opendns.com.

push "dhcp-option DNS 208.67.222.222"

push "dhcp-option DNS 208.67.220.220"

然后 我们必须选择要使用的密码:

先于:

# Select a cryptographic cipher.

# This config item must be copied to

# the client config file as well.

;cipher BF-CBC        # Blowfish (default)

;cipher AES-128-CBC   # AES

;cipher DES-EDE3-CBC  # Triple-DES

则:

# Select a cryptographic cipher.

# This config item must be copied to

# the client config file as well.

;cipher BF-CBC        # Blowfish (default)

cipher AES-256-CBC   # AES

;cipher DES-EDE3-CBC  # Triple-DES

auth SHA512

最后,让我们使OpenVPN使用非特权用户帐户而不是root用户,这不是特别安全。

user openvpn

group nogroup

现在我们可以保存并关闭此文件以创建该用户:

sudo adduser --system --shell /usr/sbin/nologin --no-create-home openvpn

我们通过以下方式激活服务:

sudo systemctl enable openvpn@server

sudo systemctl start openvpn@server

发表您的评论

您的电子邮件地址将不会被发表。 必填字段标有 *

*

*

  1. 负责数据:MiguelÁngelGatón
  2. 数据用途:控制垃圾邮件,注释管理。
  3. 合法性:您的同意
  4. 数据通讯:除非有法律义务,否则不会将数据传达给第三方。
  5. 数据存储:Occentus Networks(EU)托管的数据库
  6. 权利:您可以随时限制,恢复和删除您的信息。