我可以对特定 VPN 帐户使用 --duplicate-cn 选项,而不是在服务器级别使用吗?

我可以对特定 VPN 帐户使用 --duplicate-cn 选项,而不是在服务器级别使用吗?

如果我使用,--duplicate-cn我会看到它对我的服务器的所有帐户都有效。我想将其设置为每个客户端,以便我可以仅将此选项提供给选定的帐户。可以吗?

答案1

duplicate-cn选项确实适用于整个服务器,因此为了执行此操作,您需要运行两个 OpenVPN 实例(并且它们必须在不同的端口上运行)。

如果您使用的是 EL7 或 Fedora,则设置起来非常容易。使用您的独特配置创建/etc/openvpn/server1.conf/etc/openvpn/server2.conf,然后启用它们:

systemctl enable openvpn@server1
systemctl enable openvpn@server2
systemctl start openvpn@server1
systemctl start openvpn@server2

相关内容