| > You have to give it routing information through an out of band mechanism “AllowedIPs.” One downside is that you can’t have two peers that act as general routers on the same wireguard network This is a common misconception, due to that this is the way wg-quick works (unfortunately IMO; presumably to make it easier, and I guess wg-quick was never meant for people with advanced needs). On a lower level, AllowedIPs is really just "allowed IPs", and does no routing. You can have multiple active peers with overlapping AllowedIPs. If you set up the tunnel through other means, you can make your own routes. For example in systemd-networkd, see `RouteTable` under the `[WireguardPeer]` section of systemd.netdev(5). (This was unfortunately broken for a brief while in systemd in Jan, but should now be fixed again: https://github.com/systemd/systemd/pull/22136. If it's not clear from the link, old and current behavior are that no routes are added unless RouteTable is explicitly set) You should also be able to set it up manually and then add routes, policies and rules manually however you would otherwise. (You're of course right on the protocol layer, but that is not the cause of the problem you want to solve) |
> In other words, when sending packets, the list of allowed IPs behaves as a sort of routing table, and when receiving packets, the list of allowed IPs behaves as a sort of access control list.
> This is what we call a Cryptokey Routing Table: the simple association of public keys and allowed IPs.
Which is, I believe, also why zx2c4 called to revert the whole systemd-networkd feature.
I would really want it to work as it would simplify my network configuration by a bit. Please share a working example if you are able to make it work, thanks!
Last I tried that I used iproute 2 to manually setup interfaces, use wg setconf to load WireGuard configurations. So I don't think it's my tool to blame.