One of the more sexy features that Linux brings to the table is its simplistic networking interface compared to its ugly brother Windows. Since just a few years ago the story now is completely different, with Network Manager offered in most major distributions (thanks Red Hat!). The new Network Manager even goes so far as to manage my VPN connections with a plugin (this means the Windows VPN). I was so impressed with one of the features of the VPN routing that I decided to upload a video to demonstrate its power. Check it out below:
A short summary: I used Speedtest.net to graphically show where my IP address originating from. When I connect via VPN it changes my point of origin to go through the VPN connection (this is the behavior of Windows too). However, Linux is set apart by its unique (AFAIK) ability to filter which range of IP addresses are routed through this slow, pokey connection. Basically, only IPs starting with 168.28…. are pushed through VPN, leaving the rest of the world at full speed. Setup couldn’t be much easier once you understanding the basic premise of representing IP ranges. More information of routing is below the video.
An IP address is a 32-bit number. There are four parts, separated by the “.” symbol. Therefor, each part is 8-bits worth of data. If you want to specify the range 188.8.131.52 through 184.108.40.206 then you can represent that like this: 220.127.116.11/24. The “24” means the first 24 bits (or first three groups separated by the “.” control the range. In other words, the last set of digits doesn’t matter at all – the desired effect.
If you wanted the first two sets to control the range or everything from 168.28…. then you can represent that as follows: 168.28.0/16. The “16” means the first two groups control the range.