通过搭建虚拟企业专用网,我们可以很方便的在出差时访问公司内网资源,同时客户端和服务器之间通过证书认证,保密性也不错, 只需1台具有公网IP的主机。
具有公网IP的主机安装服务端,安装过程如下:
一、安装epel源
dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
二、安装OpenVPN
dnf install openvpn
三、配置文件路径
/etc/openvpn/
四、安装系统服务
#客户端
systemctl enable openvpn-client@client
systemctl start openvpn-client@client
#服务端
systemctl enable openvpn-server@server
systemctl start openvpn-server@server