▲ | sevg 19 hours ago | ||||||||||||||||
I've always been slightly puzzled about why there isn't an easy built-in way to tunnel all traffic (ie, AllowedIPs = 0.0.0.0/0, ::/0) EXCEPT for some specific IPs. You end up having to programmatically generate a massive list of CIDRs that include everything except those specific IPs. | |||||||||||||||||
▲ | adamcharnock 19 hours ago | parent | next [-] | ||||||||||||||||
I agree that would be useful. I'm fairly sure it is because all the entries in `AllowedIPs` are just written as-is to the routing table, and the routing logic in the kernel (and most/all routers?) has no facility for 'does not match'. Instead the solution would be to add a explicit route to state where the excluded CIDR should be sent to. That would would be more specific and would therefore be used for matching packets rather than the 0.0.0.0/0 (or whatever) routed pointed at the wireguard tunnel. | |||||||||||||||||
| |||||||||||||||||
▲ | tjoff 16 hours ago | parent | prev | next [-] | ||||||||||||||||
Calculator for the workaround: https://www.procustodibus.com/blog/2021/03/wireguard-allowed... | |||||||||||||||||
▲ | mrbluecoat 10 hours ago | parent | prev | next [-] | ||||||||||||||||
See https://github.com/tailscale/tailscale/issues/11717#issuecom... | |||||||||||||||||
▲ | graton 11 hours ago | parent | prev | next [-] | ||||||||||||||||
I think you need to use `Table = off`. With that you probably can get what you want. | |||||||||||||||||
▲ | rudasn 18 hours ago | parent | prev | next [-] | ||||||||||||||||
Can't you do that with a prerouting firewall rule? Genuinely asking, never tried myself but seems plausible. | |||||||||||||||||
| |||||||||||||||||
▲ | 19 hours ago | parent | prev | next [-] | ||||||||||||||||
[deleted] | |||||||||||||||||
▲ | pm2222 11 hours ago | parent | prev | next [-] | ||||||||||||||||
ip route to blackhole works. ip rule works. ip/nftables works. tc works. ebpf works. | |||||||||||||||||
▲ | bsder 15 hours ago | parent | prev [-] | ||||||||||||||||
Or the reverse, most people have specific IPs that they'd like to route traffic through the VPN but mostly don't care about the rest. Again, you wind up creating a huge list of exact IPs and creating the routing rules is a PITA. | |||||||||||||||||
|