# wireguard 自建局域网 ## 安装wireguard [github地址](https://github.com/angristan/wireguard-install "github地址") ``` shell curl -O https://raw.githubusercontent.com/angristan/wireguard-install/master/wireguard-install.sh chmod +x wireguard-install.sh ./wireguard-install.sh ``` ## win设置端口转发 ``` shell netsh interface portproxy add v4tov4 listenport=2223 listenaddress=0.0.0.0 connectport=22 connectaddress=192.168.200.129 New-NetFirewallRule -DisplayName "Allow WireGuard Traffic Out" -Direction Outbound -Action Allow -InterfaceAlias "wg0-client-win" New-NetFirewallRule -DisplayName "Allow WireGuard Traffic" -Direction Inbound -Action Allow -InterfaceAlias "wg0-client-win" ``` 最后修改:2025 年 03 月 23 日 © 允许规范转载 打赏 赞赏作者 支付宝微信 赞 如果觉得我的文章对你有用,请随意赞赏