wireguard进行组网

logo成就你的写作梦想
wireguard进行组网
 
it之承影含光
 
简书作者
2024-06-13 15:18IP属地: 上海
需求:在家中访问公司网络
 
1.在服务器中安装wireguard
1.1 下载脚本
 
curl -O https://raw.githubusercontent.com/atrandys/wireguard/master/wg_mult.sh && chmod +x wg_mult.sh && ./wg_mult.sh
1.2 上述脚本安装之后只会安装了 wireguard-tools,但这只包含了用户空间的工具,例如 wg 和 wg-quick。您还需要安装 内核模块 才能使 WireGuard 在您的系统上运行。我的服务器是CentOS7,
CentOS 7 默认没有提供 WireGuard 内核模块,需要从 ELRepo 软件源安装:
 
1.2.1. 导入 ELRepo 公钥:
 
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
1.2.2. 安装 ELRepo 软件源:
 
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.el7.elrepo.noarch.rpm
1.2.3. 安装 WireGuard 内核模块:
 
sudo yum install kmod-wireguard
1.2.4. 加载 WireGuard 模块:
 
sudo modprobe wireguard
1.2.5. 验证模块是否加载:
 
lsmod | grep wireguard
如果看到输出 wireguard 和一些数字,说明模块已经加载成功。
image.png
2.运行./wg_mult.sh
image.png
到/etc/wireguard/ 下载client.conf
 
 
image.png
客户端下载安装
https://www.wireguard.com/install/
https://github.com/WireGuard/wireguard-windows
image.png
github国内加速代理访问
参考WireGuard
 
最后编辑于:2024-06-13 17:04
© 著作权归作者所有,转载或内容合作请联系作者
 
简书作者
 
 
it之承影含光 
写了 9557 字,获得了 -24 个喜欢
作者个人主页 
 
创作你的创作,
接受世界的赞赏
||热门文章
 
posted @   技术颜良  阅读(143)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全网最简单!3分钟用满血DeepSeek R1开发一款AI智能客服,零代码轻松接入微信、公众号、小程
· .NET 10 首个预览版发布,跨平台开发与性能全面提升
· 《HelloGitHub》第 107 期
· 全程使用 AI 从 0 到 1 写了个小工具
· 从文本到图像:SSE 如何助力 AI 内容实时呈现?(Typescript篇)
历史上的今天:
2022-10-07 Go进阶05:不安全指针unsafe.Pointer使
2020-10-07 rabbitmq单机创建集群,指定端口号
2020-10-07 centos中安装redis插件bloom-filter
点击右上角即可分享
微信分享提示