whats the total number of /s in:
q: how do i route all public traffic through wireguard but not local traffic? i know theres a series of cidrs that i can use to cover all public cidrs and leave out local cidrs, but i cannot find this anywhere and i dont recall where i found it a couple of years ago when previously solving this problem.
my goal is to have two configurations of the same wireguard endpoint:

*

*one where only traffic specifically to the wireguard cidr is routed through the tunnel;

*one where all traffic to ips in public cidrs + traffic to the wireguard cidr is routed through the tunnel.

does anyone have this configuration and can share it?

a: found it in a comment on a reddit thread.
allowedips needs to have the following list in addition to the cidr block of your wireguard configuration. in my case, ive prepended 10.1.0.0/16 to this list.
allowedips = 0.0.0.0/5, 8.0.0.0/7, 11.0.0.0/8, 12.0.0.0/6, 16.0.0.0/4, 32.0.0.0/3, 64.0.0.0/2, 128.0.0.0/3, 160.0.0.0/5, 168.0.0.0/6, 172.0.0.0/12, 172.32.0.0/11, 172.64.0.0/10, 172.128.0.0/9, 173.0.0.0/8, 174.0.0.0/7, 176.0.0.0/4, 192.0.0.0/9, 192.128.0.0/11, 192.160.0.0/13, 192.169.0.0/16, 192.170.0.0/15, 192.172.0.0/14, 192.176.0.0/12, 192.192.0.0/10, 193.0.0.0/8, 194.0.0.0/7, 196.0.0.0/6, 200.0.0.0/5, 208.0.0.0/4, 8.8.8.8/32

i also came across this neat cidr block calculator tool that could have been helpful:
https://www.procustodibus.com/blog/2021/03/wireguard-allowedips-calculator/

user
The passage contains 39 "/"s.
assistant