因为fortivpnclient安装本机后,会创建6个服务,虚拟网卡及后台,而且每周真正需要连接的时间不长,特意创建DNS服务后,连接持久化连接公司的VPN
fortivpnclient 持久化连接
目前因为使用的是免费版,windows客户端无法持久化连接vpn,可以通过openfortivpn建立连接后,通过流量转发到目标机器上,达到多设备无需安装客户端即可访问内网
官方描述:
openfortivpn is a client for PPP+SSL VPN tunnel services. It spawns a pppd process and operates the communication between the gateway and this process.
It is compatible with Fortinet VPNs.
看到这边,就知道要先解决本机依赖
- ppp
emerge -avj dahdi-tools
或者
emerge -avj networkmanager (推荐) - SSL
emerge -avj openssl
openfortivpn 配置文件路径默认/etc/openfortivpn/config
host = ****.*****.com
port = 4430
username = 账号
password = 密码
trusted-cert = 521cd4b154b9ffd*******b8837a3aa9b34****b0f780def6fd5d595dbd06(证书签名)
pppd-use=peerdns = 1
set-dns = 0
set-routes = 1
pppd-use-peerdns = 1
persistent=5 #循环运行vpn,定义连接断开后重拨的时间(秒)
最后执行:
#如果你的配置文件用的是默认配置路径
sudo openfortivpn
#指定文件路径
sudo openfortivpn -c /you/config/path
效果: