Sep 27, 2009

Enhancement to Split-Tunnel VPN

Remember the Split-Tunnel VPN?

In case you need a script to manually add some static routes to your corporate network. Here's one:

@echo off
for /f "tokens=3" %%x in ('route print ^| find "10.0.0.0"') do @set INPUT=%%x

route add 172.16.0.0 mask 255.128.0.0 %INPUT% metric 1
route add 192.168.0.0 mask 255.255.0.0 %INPUT% metric 1

Have fun!

This is assuming your VPN login subnet is 10.0.0.0/8 and you wish to add 2 static routes: 172.16.0.0/12 and 192.168.0.0/16.