You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

通过WireGuard VPN隧道无法从公网访问目标URL的问题求助

通过WireGuard VPN隧道无法从公网访问目标URL的问题求助

我正尝试从互联网访问路由器的设置网页。我在AWS EC2上搭建了WireGuard VPN,路由器和WireGuard服务器之间的握手看起来正常,但我无法通过EC2实例的公网IP访问这个URL——http://y.y.y.y:51820。有没有人能提供解决方案?

服务器配置

[Interface]
Address = 172.31.16.1/20
SaveConfig = true
ListenPort = 51820
PrivateKey = PrivateKey
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE

握手详情

服务器端信息

interface: wg0
  public key: public key
  private key: (hidden)
  listening port: 51820

peer: public key
  endpoint: x.x.x.x:6140
  allowed ips: 172.31.16.2/32
  latest handshake: 2 minutes, 1 second ago
  transfer: 13.91 KiB received...

备注:内容来源于stack exchange,提问作者TechGuy

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.04.17 11:29:27