拓扑

环境
openvpn服务器
wan:192.168.1.100/24
lan:172.16.0.1 /24
内网主机:172.16.0.2/24
外网客户端: 192.168.1.200/24
通过脚本安装
github安装脚本地址
https://github.com/Nyr/openvpn-install
执行以下命令
wget https://git.io/vpn -O openvpn-install.sh && bash openvpn-install.sh
Welcome to this OpenVPN road warrior installer!
Which IPv4 address should be used?
1) 192.168.1.100
2) 172.16.0.1
IPv4 address [1]: 1
This server is behind NAT. What is the public IPv4 address or hostname?
Public IPv4 address / hostname [123.456.77.88]:
Which protocol should OpenVPN use?
1) UDP (recommended)
2) TCP
Protocol [1]:
What port should OpenVPN listen to?
Port [1194]:
Select a DNS server for the clients:
1) Current system resolvers
2) Google
3) 1.1.1.1
4) OpenDNS
5) Quad9
6) AdGuard
DNS server [1]:
Enter a name for the first client:
Name [client]: client01
OpenVPN installation is ready to begin.
Press any key to continue...
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.huaweicloud.com
* extras: mirror.bit.edu.cn
* updates: mirror.bit.edu.cn
正在解决依赖关系
--> 正在检查事务
---> 软件包 epel-release.noarch.0.7-11 将被 安装
--> 解决依赖关系完成
依赖关系解决
==============================================================================================================

本文档详细介绍了如何在拓扑环境中通过脚本安装OpenVPN服务器,并配置客户端。首先选择了服务器的IPv4地址,然后从GitHub获取并执行安装脚本。安装过程中涉及到依赖关系解决,包括epel-release和openssl等软件包的更新和安装。接着,脚本生成了服务器和客户端的证书,并提供了客户端配置文件的路径。最后,文章提到了客户端配置文件的结构,包括client.conf和server.conf的主要配置项。
最低0.47元/天 解锁文章
1万+

被折叠的 条评论
为什么被折叠?



