想用京东云服务器作为国内两处异地nat组网中转端,配置好wireguard后发现在京东云ping得同两地nat,但是两地nat无法互通,已经在服务器配置了ipv4转发,求问大佬这是什么问题,感觉像是京东云的问题.
云服务器上的配置如下
#公网gateway配置
[Interface]
#wireguard网段
Address = 10.0.2.1/32
ListenPort = 12345
PrivateKey =
#通过`ip addr`获得主网卡名称,一般为eth0
#放行虚拟网卡
PostUp = iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o ens3 -j MASQUERADE
PostUp = sysctl -w net.ipv4.ip_forward=1
PostDown = iptables -D FORWARD -i wg0 -j ACCEPT; iptables -D FORWARD -o wg0 -j ACCEPT; iptables -t nat -D POSTROUTING -o ens3 -j MASQUERADE
[Peer]
PublicKey =
AllowedIPs = 10.0.2.6/32, 192.168.122.1/24
PersistentKeepalive = 25
[Peer]
PublicKey =
AllowedIPs = 10.0.2.7/32,192.168.123.1/24
PersistentKeepalive = 25