I’ve recently set up WireGuard on a server using wg-easy (so the config files are generated, not typed out by hand) and I successfully connected a couple of peers, including Linux computers. The last one to set up is my laptop with EndeavourOS and I just can’t figure out why this single device is not able to ping other peers (or reach http services hosted on those peers). Let’s say I’m trying to connect to a PC. The four most important bits (I think):
- The ping actually reaches the PC and the PC does respond (verified using tcpdump), but the response is never received by the laptop. I’m no expert but to me it suggests it’s not an issue with the wg config (
ip route get PC-IP
returns the correct interface). - I disabled firewalld and it still didn’t work (tried looking at the logs before I did that but it also didn’t seem like it was blocking anything). There's no rules in iptables.
- The handshake with the server (where wg-easy is set up) works.
- I am able to ping the PC via it’s non-WireGuard IP.
I also tried some other common-sense solutions like restarting the interface with wg-quick, rebooting, switching to another network, nothing helps. I’ve no idea what could be the issue here, so any help would be appreciated.
EDIT: Here are the configs of the peers in question:
wg-easy server config:
# Server
[Interface]
PrivateKey = (a key)
Address = 10.8.0.1/24
ListenPort = 51820
PreUp =
PostUp = iptables -t nat -A POSTROUTING -s 10.155.129.0/24 -o eth0 -j MASQUERADE; iptables -A INPUT -p udp -m udp --dport 51820 -j ACCEPT; iptables -A FORWARD -i wg0 -j ACCEPT; iptables -A FORWARD -o wg0 -j ACCEPT;
PreDown =
PostDown =
# Client: PC
[Peer]
PublicKey = (a key)
PresharedKey = (a key)
AllowedIPs = 10.155.129.2/32
# Client: laptop
[Peer]
PublicKey = (a key)
PresharedKey = (a key)
AllowedIPs = 10.155.129.6/32
PC's config:
[Interface]
PrivateKey = (a key)
Address = 10.155.129.2/24
DNS = 1.1.1.1
[Peer]
PublicKey = (a key)
PresharedKey = (a key)
AllowedIPs = 10.155.129.0/24
PersistentKeepalive = 25
Endpoint = (server's public IP):51820
and finally the laptop's config:
[Interface]
PrivateKey = (a key)
Address = 10.155.129.6/24
DNS = 1.1.1.1
[Peer]
PublicKey = (a key)
PresharedKey = (a key)
AllowedIPs = 10.155.129.0/24
PersistentKeepalive = 25
Endpoint = (server's public IP):51820
Thanks!
ip route
.sudo tcpdump -i ens3 icmp
and I went through all the interfaces inip addr
. Was that the correct command?