After connecting the two machines, they still cannot ping each other
taikai-zz opened this issue · 0 comments
The environment is as follows:
1 external network server : A server with an external IP in the computer room
2 NAT intranet machines :Two machines in the company office
The configuration is as follows:
server
[Interface]
Address = 10.7.0.1/24
PrivateKey = WDV4SoSEjQd6wBCoxxxxxxxxxxxxxxx
ListenPort = 51820
[Peer]
PublicKey = nHSnyK9xH61CBNepxxxxxxxxxxxxxxxx
AllowedIPs = 10.7.0.2/32
[Peer]
PublicKey = Z66zly/k4Z0NNQSh4xxxxxxxxxxxxxxx
AllowedIPs = 10.7.0.3/32
10.7.0.2
[Interface]
Address = 10.7.0.3/32
PrivateKey = IKBiyNX2GTwRbxxxxxxxxxxxxxxxxxx
ListenPort = 51820
[Peer]
PublicKey = flpN2Hgb+Xxxxxxxxxxxxxxxxxxxxxxxx
AllowedIPs = 10.7.0.1/32
Endpoint = server:51820
PersistentKeepalive = 5
[Peer]
PublicKey = nHSnyK9xH61CBNepxxxxxxxxxxxxxxxx
AllowedIPs = 10.7.0.2/32
PersistentKeepalive = 5
10.7.0.3
[Interface]
Address = 10.7.0.2/32
PrivateKey = yPW9iRlX974Kxxxxxxxxxxxxxxxxxxx
ListenPort = 51821
[Peer]
PublicKey = flpN2Hgb+Xxxxxxxxxxxxxxxxxxxxxxxx
AllowedIPs = 10.7.0.1/32
Endpoint = 115.68.248.181:51820
PersistentKeepalive = 5
[Peer]
PublicKey = Z66zly/k4Z0NNQSh4xxxxxxxxxxxxxxx
AllowedIPs = 10.7.0.3/32
PersistentKeepalive = 5
Corefile
.:5353 {
debug
wgsd vpn.test. wg0 {
self server:51820 10.7.0.0/24
}
}
10.7.0.3
/root/wgsd-client -device=wg0 -dns=server:5353 -zone=vpn.test
interface: wg0
public key: Z66zly/k4Z0NNQSh4xxxxxxxxxxxxxxx
private key: (hidden)
listening port: 51820
peer: flpN2Hgb+Xxxxxxxxxxxxxxxxxxxxxxxx
endpoint: server:51820
allowed ips: 10.7.0.1/32
latest handshake: 1 minute, 18 seconds ago
transfer: 2.52 KiB received, 25.64 KiB sent
persistent keepalive: every 5 seconds
peer: nHSnyK9xH61CBNepxxxxxxxxxxxxxxxx
endpoint: nat_external:51821
allowed ips: 10.7.0.2/32
transfer: 0 B received, 94.23 KiB sent
persistent keepalive: every 5 seconds
10.7.0.2
/root/wgsd-client -device=wg0 -dns=server:5353 -zone=vpn.test
interface: wg0
public key: nHSnyK9xH61CBNepxxxxxxxxxxxxxxxx
private key: (hidden)
listening port: 51821
peer: flpN2Hgb+Xxxxxxxxxxxxxxxxxxxxxxxx
endpoint: server:51820
allowed ips: 10.7.0.1/32
latest handshake: 18 seconds ago
transfer: 92 B received, 276 B sent
persistent keepalive: every 5 seconds
peer: Z66zly/k4Z0NNQSh4xxxxxxxxxxxxxxx
endpoint: nat_external::51820
allowed ips: 10.7.0.3/32
transfer: 0 B received, 148 B sent
persistent keepalive: every 5 seconds
The machines 10.7.0.2 and 10.7.0.3 cannot be pinged, and the transfer seen in the wg show is 0B received, resulting in 0B being the final result