Why does 'allowed-ips' affect route selection behavior?

mikma.wg at m7n.se mikma.wg at m7n.se
Sun Apr 15 20:58:31 CEST 2018

On 04/15/2018 08:49 PM, Patrick O'Sullivan wrote:

> $ sudo ip route show
> default via dev wlan0
> dev wg0 proto kernel scope link src
> dev wlan0 proto kernel scope link src
> By this route table, traffic to e.g. should use
> Packet captures were showing traffic trying to instead use wg0. Then I
> found this:
> $ sudo ip route get
> dev wg0 table 51820 src
>      cache
> Can someone please explain this behavior?

Table 51820 is the default table used by wg-quick.

 From wg-quick's man page:

> It infers all routes from the list of peers' allowed IPs, and automatically  adds them to the system routing table. If one of those routes is the default route ( or ::/0), then it uses ip-rule(8) to  handle overriding of the default gateway.


More information about the WireGuard mailing list