<div>> Allowed IPs is like a routing table; you can't have two routes for the same set of IPs</div><div><br></div>If this is the case, then wireguard does not have proper routing support.<div><br></div><div>Normally, routing tables allow both multiple and overlapping routes present. When making routing decisions, the most-specific route is chosen (e.g. a /29 is higher priority than a /24 which overlaps with it). If there are two identical routes of the same size, then the one with the lowest routing metric is used.</div><div><br></div><div>I can understand not allowing identical routes of the same size, as wireguard doesn't really have a concept of metric (although it could be useful for backup links). However, it really should allow overlapping routes of different sizes. There's no ambiguity with routing decisions, and it's a standard feature that I would normally expect any IP routing stack to have.</div><div><br></div><div>Cheers,</div><div>Steve<br><br><div class="gmail_quote"><div dir="ltr">On Fri, 16 Mar 2018, 04:57 Samuel Holland, <<a href="mailto:samuel@sholland.org">samuel@sholland.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello,<br>
<br>
On 03/15/18 10:31, Gianluca Gabrielli wrote:<br>
> I was setting two peers on the server, but every time I re-add one of these<br>
> two the other one is shown with (none) on "allowed ips" field. Of course that<br>
> blocks communications with that peer. If I try to re-add it, then the other<br>
> peer loses its configuration, same problem.<br>
<br>
Allowed IPs is like a routing table; you can't have two routes for the same set<br>
of IPs, or WireGuard doesn't know which peer to send the traffic to. You want to<br>
have non-overlapping Allowed IP ranges. This usually means that the range of<br>
Allowed IPs is smaller than the host's subnet. For example:<br>
<br>
Host A:<br>
IP configuration for WireGuard interface: <a href="http://192.168.123.1/24" rel="noreferrer" target="_blank">192.168.123.1/24</a><br>
Allowed IPs for Host B: <a href="http://192.168.123.2/32" rel="noreferrer" target="_blank">192.168.123.2/32</a><br>
<br>
Host B:<br>
IP configuration for WireGuard interface: <a href="http://192.168.123.2/24" rel="noreferrer" target="_blank">192.168.123.2/24</a><br>
Allowed IPs for Host A: <a href="http://192.168.123.1/32" rel="noreferrer" target="_blank">192.168.123.1/32</a><br>
<br>
The IP configuration tells the kernel which IP ranges are accessible via the<br>
WireGuard interface. The Allowed IPs tell WireGuard, which _subset_ of those IPs<br>
is associated with each peer.<br>
<br>
> Cheers,<br>
> Gianluca<br>
<br>
Cheers,<br>
Samuel<br>
_______________________________________________<br>
WireGuard mailing list<br>
<a href="mailto:WireGuard@lists.zx2c4.com" target="_blank">WireGuard@lists.zx2c4.com</a><br>
<a href="https://lists.zx2c4.com/mailman/listinfo/wireguard" rel="noreferrer" target="_blank">https://lists.zx2c4.com/mailman/listinfo/wireguard</a><br>
</blockquote></div></div>-- <br><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><p dir="ltr">Cheers,</p>
<p dir="ltr"><b>Steve Gilberd</b><br>
<font color="#666666">Erayd LTD </font><b><font color="#666666">·</font></b><font color="#666666"> Consultant</font><br>
<i><font color="#666666">Phone: +64 4 974-4229 </font></i><b><i><font color="#666666">·</font></i></b><i><font color="#666666"> Mob: +64 27 565-3237</font></i><br>
<i><font color="#666666">PO Box 10019 The Terrace, Wellington 6143, NZ</font></i></p>
</div></div>