From my understanding of your comment:
I'm trying to do split tunneling, I want a list of ranges not being
routed through the tunnel, so I need a list of routes that doesn't
match with these ranges.
you really don't need this list.
Routing works primarily by selecting the more specific route first.
So in a split tunneling scheme:
- you have a default (0.0.0.0/0) route that points to your Internet Gateway.
- you have more specific routes that point to the VPN tunnel interface.
All traffic that doesn't match the specific routes will use the default route.
- Home LAN internal network 192.168.0.0.24; gateway 192.168.0.1
- Remote network connected through VPN with networks 172.16.0.0/20 and 10.0.0.0/12, interface ppp0
- You must connect to another network which use 10.0.10.0/24, second VPN connection interface ppp1
You have the following forwarding (routing) table:
0.0.0.0/0 via 192.168.0.1
172.16.0.0/20 via ppp0
10.0.0.0/12 via ppp0
10.0.10.0/24 via ppp1
- a packet to 220.127.116.11 will goes through 192.168.0.1
- a packet to 10.0.10.1 will goes through ppp1
- a packet to 10.0.11.1 will goes through ppp0