[Feature Request] Add ability to exclude subnets from AllowedIPs

Aryn Starr whereislelouch at icloud.com
Thu Aug 22 21:10:55 CEST 2019


I live in Iran, and here the internet censorship is fierce. I need to route almost all of my traffic through the VPN, but some domestic sites are not accessible from the US. Also, since ISPs apply different censoring rules, sometimes my own servers are not reachable via the VPN (because the server’s ISP blocks the VPN, while my local ISP does not.)
The best current solution I’ve seen is
```
$ python3

>>> import ipaddress
>>> n1 = ipaddress.ip_network('106.203.202.0/23')
>>> n2 = ipaddress.ip_network('106.203.203.13/32')
>>> l = list(n1.address_exclude(n2))
>>> print(l)

```
Which is terrible.


More information about the WireGuard mailing list