0

Let's say I have 1000 ranges and I would like to make routes that doesn't match these ranges, anyone has any particular tips or tools to share beside doing math ?

Example : I have these ranges

13.64.0.0/11

13.104.98.192/27

.......

.......

I want to find the routes that doesn't match with these subnets, for the first range, the routes would be

enter image description here

and for the second :

enter image description here

.......

.......

Thanks in Advance.

  • Can you provide more information? – ditrapanij Mar 23 at 8:30
  • It is unclear what you try to achieve. You can't make "exclusion" route, you can make blackhole routes of course. Do you want to find out which range in your list doesn't have a specific route yet? – JFL Mar 23 at 8:37
  • I edited my post – Blackjack55 Mar 23 at 8:39
  • Sorry I still doesn't understand which real-world problem your try to tackle. A more specific route is always preferred over a more generic route; so really a 0.0.0.0/0 route can as well be used. Please explain what your problem is so we can help you with a real solution. – JFL Mar 23 at 9:08
  • 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. – Blackjack55 Mar 23 at 9:12
1

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.

Simple example:

  • 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

Then:

  • a packet to 4.5.6.7 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
| improve this answer | |
  • In my case, all traffic except a list of ranges should go through the tunnel, and these 1000 ranges should go through the Home Internet, I want to exclude some ranges that consumes lot of Bandwidth from going through the tunnel – Blackjack55 Mar 23 at 10:12

Not the answer you're looking for? Browse other questions tagged or ask your own question.