I have Wireguard set up on an Arch server (the server is both on the LAN 192.168.10.0/24
network as 192.168.10.2
, and the WG one (192.168.20.0/24
, he is 192.168.20.0
).
I connect to this server from a client on the Internet (I will use client and server words to make it clear which peers I am talking about). The WG IP is 192.168.20.3
.
What works
I can connect from the client to the server → from the client all of the below are OK
ping 192.168.20.0
→ client to WG endpoint on the serverping 192.168.10.2
→ client to the server LAN IPping 192.168.10.68
→ client to a machine on the LAN
What does not work
I cannot ping the client from the server:
root@srv ~# ping 192.168.20.3
PING 192.168.20.3 (192.168.20.3) 56(84) bytes of data.
^C
--- 192.168.20.3 ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6081ms
Since the client → sever connectivity is OK, it means that the routing is fine (packets can go to the devices on the LAN and come back afterward)
The routing table on the server:
root@srv ~ [1]# ip r
default via 192.168.10.1 dev enp3s0 proto static
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-4f4174b6b888 proto kernel scope link src 172.18.0.1
192.168.10.0/24 dev enp3s0 proto kernel scope link src 192.168.10.2
192.168.10.0/24 dev wg0 proto static scope link
192.168.20.0/24 dev wg0 proto kernel scope link src 192.168.20.0
On the client:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric
0.0.0.0 0.0.0.0 192.168.0.1 192.168.0.113 45
127.0.0.0 255.0.0.0 On-link 127.0.0.1 331
127.0.0.1 255.255.255.255 On-link 127.0.0.1 331
127.255.255.255 255.255.255.255 On-link 127.0.0.1 331
192.168.0.0 255.255.255.0 On-link 192.168.0.113 301
192.168.0.113 255.255.255.255 On-link 192.168.0.113 301
192.168.0.255 255.255.255.255 On-link 192.168.0.113 301
192.168.10.0 255.255.255.0 On-link 192.168.20.3 5
192.168.10.255 255.255.255.255 On-link 192.168.20.3 261
192.168.20.0 255.255.255.0 On-link 192.168.20.3 5
192.168.20.3 255.255.255.255 On-link 192.168.20.3 261
192.168.20.255 255.255.255.255 On-link 192.168.20.3 261
224.0.0.0 240.0.0.0 On-link 127.0.0.1 331
224.0.0.0 240.0.0.0 On-link 192.168.0.113 301
255.255.255.255 255.255.255.255 On-link 127.0.0.1 331
255.255.255.255 255.255.255.255 On-link 192.168.0.113 301
===========================================================================
Persistent Routes:
None