Hi all,
I’ve been driven crazy by this issue all day. I’ve read the documentation and I’ve read @anav’s excellent Wireguard Success For The Beginner guide and I stil think my configuration should work but it doesn’t.
I have a CHR as a Wireguard server. I have three other CHRs that I want to connect to it. However only one peer at a time seems to be able to connect. If I disable and enable wireguard on another peer it will disconnect the one that’s just been connected.
Essentially I’m attempting a “Road Warrior” scenario with the peers. And even in a lab I’m running into the same issue. The config snippets below are from my lab setup. No firewall configured. No NAT and no fasttrack.
No duplicate MAC addresses, no duplicate IP addresses and all public keys are correct.
I’ve probably spent too long at this now to see some obvious mistake so I’m hoping some fresh eyes and someone with greater knowledge might see something i’m doing wrong.
EDIT - By client disconnecting I mean that if one peer is connected and can ping the wireguard server on 10.1.1.1 The next that connects will result in the ping failing and then only the newly connected peer can ping 10.1.1.1
First is the config of the Wireguard Server:
/interface wireguard
add listen-port=13231 mtu=1420 name=wireguard1
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=192.168.200.103 interface=wireguard1 public-key="+qbs4wLvSw6GR3eMkwBRR1ymFYNyNW+uWvnTToGSMEc="
add allowed-address=0.0.0.0/0 endpoint-address=192.168.200.104 interface=wireguard1 public-key="qXXSsBjIaldjVebVwIeZc0qHj6QXeCy9gDZcigTH6wE="
add allowed-address=0.0.0.0/0 endpoint-address=192.168.200.102 interface=wireguard1 public-key="ADSn6CBML7s8JiE99mPG0mqzXjLKohD7cBIik8MG4SQ="
/ip address
add address=192.168.200.101/24 interface=ether1 network=192.168.200.0
add address=10.1.1.1/24 interface=wireguard1 network=10.1.1.0
/ip route
add dst-address=0.0.0.0/0 gateway=192.168.200.1
/routing/route> print
Flags: A - ACTIVE; c, s, a - SLAAC; H - HW-OFFLOADED
Columns: DST-ADDRESS, GATEWAY, AFI, DISTANCE, SCOPE, TARGET-SCOPE, IMMEDIATE-GW
DST-ADDRESS GATEWAY AFI DISTANCE SCOPE TARGET-SCOPE IMMEDIATE-GW
As 0.0.0.0/0 192.168.200.1 ip4 1 30 10 192.168.200.1%ether1
Ac 10.1.1.0/24 wireguard1 ip4 0 10 wireguard1
Ac 192.168.200.0/24 ether1 ip4 0 10 ether1
Ac fe80::%ether1/64 ether1 ip6 0 10 ether1
Ac fe80::%wireguard1/64 wireguard1 ip6 0 10 wireguard1
A H ether1 link 0
Each peer has an almost identical config so I’ll just post the config of one:
/interface wireguard
add listen-port=13231 mtu=1420 name=wireguard1
/interface wireguard peers
add allowed-address=0.0.0.0/0 endpoint-address=192.168.200.101 endpoint-port=13231 interface=wireguard1 public-key="Y/Whx13s4517zbRgmI7vGI0o7EeVUiFQgddTnBeMh30="
/ip address
add address=192.168.200.102/24 interface=ether1 network=192.168.200.0
add address=10.1.1.2 interface=wireguard1 network=10.1.1.2
/ip route
add dst-address=0.0.0.0/0 gateway=192.168.200.1
add disabled=no dst-address=10.1.1.0/24 gateway=wireguard1 routing-table=main suppress-hw-offload=no