WireGuard 配置备忘
💡
原文中文,约1700字,阅读约需4分钟。
📝
内容提要
最近学会了使用WireGuard进行打洞,配置文件写在/etc/wireguard/${name}.conf中,通过wg-quick [up/down] ${name}启停,推荐使用systemctl [enable/disable/start/stop] wg-quick@${name}.service进行管理。
🎯
关键要点
- 使用WireGuard进行打洞的基本步骤和配置
- 生成私钥和公钥的命令
- 配置文件存放路径为/etc/wireguard/${name}.conf
- 使用wg-quick命令进行启停操作
- 推荐使用systemctl管理WireGuard服务
- 服务端和客户端的懒人脚本示例
- 服务端配置包括私钥、内部IP和端口
- 客户端配置包括公钥、服务器IP和内部IP
➡️