Say you’re at work, and the office router (192.168.1.1) gives you access to 10.3.0.0/16. This is where your company’s cloud is or whatever. You want all your traffic to go through your home network for whatever convoluted reason, except for the 10.3 stuff.
You just add
PreUp = ip route add 10.3.0.0/16 via 192.168.1.1 dev eth0
And
AllowedIPs = 0.0.0.0/0
(Edit: remember to add a post up)
And bam, you’re done. No crazy allowedip rules. When your computer generates packets to the company cloud, your OS won’t even try to talk to the VPN. Because the route table makes it go somewhere else entirely.
I don’t know if this was the exact use-case you described in your blog, but I’m sure you can figure it out from here.
Oh and this is also fully documented online in many places, including the AllowedIPs Calculator: https://www.procustodibus.com/blog/2021/03/wireguard-allowed...