Answer the question
In order to leave comments, you need to log in
What to do if WireGuard servers don't ping?
Hello, I set up a WireGuard connection between 2 linux servers, everything went well, the network was added without errors, but for some reason the servers do not want to ping each other.
Here is the server configuration:
[Interface]
Address = 10.2.0.1/24
PrivateKey = kA7W8ujEoicjnxp0WS6pvzZX3crPP9+j9KmATJfy7Vc=
PostUp = iptables -A FORWARD -i %i -j ACCEPT; iptables -A FORWARD -o %i -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
PostDown = iptables -D FORWARD -i %i -j ACCEPT; iptables -D FORWARD -o %i -j ACCEPT; iptables -t nat -D POSTROUTING -o eth0 -j MASQUERADE
ListenPort = 39548
[Peer]
PublicKey = jxnB4ZWqXdV4xRDv8jnGQfETYN9PZynf3CX6OigayUQ=
AllowedIPs = 10.2.0.2/32
[Peer]
PublicKey = B4HdfnsJNG4arhaeJuE5UZvxJiFVWHo7Rh3LDM9fJFQ=
Endpoint = server_ip:39548
PersistentKeepalive = 5
interface: wg0-server
public key: B4HdfnsJNG4arhaeJuE5UZvxJiFVWHo7Rh3LDM9fJFQ=
private key: (hidden)
listening port: 39548
peer: jxnB4ZWqXdV4xRDv8jnGQfETYN9PZynf3CX6OigayUQ=
endpoint: client_ip:59473
allowed ips: 10.2.0.2/32
latest handshake: 40 seconds ago
transfer: 3.22 KiB received, 2.09 KiB sent
wg0-server: flags=209<UP,POINTOPOINT,RUNNING,NOARP> mtu 1420
inet 10.2.0.1 netmask 255.255.255.0 destination 10.2.0.1
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 87 bytes 3712 (3.6 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 19 bytes 2144 (2.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
Answer the question
In order to leave comments, you need to log in
some packets go around the network back and forth
nc -zvu <SERVER> <PORT>
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question