Dan*_*Dan 18 vpn ipsec fortinet
我对 VPN 了解不多,但我想通过 Ubuntu 连接到 Fortinet VPN。
我可以使用 Forticlient 在 Windows 上连接,只需输入策略服务器(vpn.theserver.com),然后它会要求输入用户/密码。我使用 IPSec。
Mir*_*ici 23
如果您使用 Fortinet 基于 SSL 的 VPN,您可以使用openfortivpn软件,它是 Ubuntu 和 Fedora 的一部分。
$ sudo apt install -y openfortivpn || yum install -y openfortivpn
$ touch openfortivpn.conf
$ chmod go= openfortivpn.conf
Run Code Online (Sandbox Code Playgroud)
编辑 openfortivpn.conf:
host =
port =
username =
password =
# trusted-cert =
Run Code Online (Sandbox Code Playgroud)
第一次连接:
$ sudo openfortivpn -c openfortivpn.conf
ERROR: Gateway certificate validation failed, and the certificate digest in not in the local whitelist. If you trust it, rerun with:
ERROR: --trusted-cert <some-random-string-to-add-to-trusted-cert>
Run Code Online (Sandbox Code Playgroud)
编辑 openfortivpn.conf 文件并trusted-cert
使用错误中的字符串更新选项。确保该选项没有被注释(删除#
)。
每次需要连接时,运行:
sudo openfortivpn -c openfortivpn.conf
Run Code Online (Sandbox Code Playgroud)
您也可以直接通过命令行进行操作,并在您的.bashrc
. 这不太安全,因为系统上的任何用户都可以使用ps
.
sudo openfortivpn -u <USER> -p <PASSWORD> --trusted-cert <CERTIFICATE> <SERVER>:<PORT>
Run Code Online (Sandbox Code Playgroud)
要断开连接,请按:Ctrl+C
Fortinet 只是一个 IPSEC VPN 服务器 - 您并不特别需要他们的客户端连接到它。IPSEC HOWTO详细列出了设置 Linux VPN 客户端的各种选项。还有一些商业 Linux IPSec 客户端,例如Shrewsoft。