ras_init.vbs: Override And Restore Routes With Windows RAS
When initiating a PPP/PPTP connection through Windows RAS you will usually end up with an altered network default route which will redirect all and every traffic through PPP/PPTP.
There are many cases however where such a behaviour is simply not desired, considering Windows RAS providing you with no way to circumvent this, you’re on your own for once more.
I wrote this script, ras_init.vbs, out of the requirement to restore my default route for normal connections and route only specific hosts and networks through PPP/PPTP.
ras_init.vbs is released under the terms of the GNU GPL, version 2. Any feedback is appreciated.
Note: Some time in the past the code of release 0.3 has been lost. As this script is not actively maintained any more, I will not invest time to redo the bugfixes.
The script would need to undergo a major rewrite, maybe in PowerShell, to work on Vista/Windows 7/Server 2008 anyway.
Change Log:
r0.3 2007/06/06
- fixed a bug with wrong RAS_Routes array enumeration
- changed script to figure out language settings on its own
- addedd support for RAS_Name, RAS_User and RAS_Pass attributes to include whitespace characters
- added support for Windows Vista (requires administrative privileges though)
r0.2 2006/06/16
- add support for interactive/non-interactive mode
r0.1 2006/06/13
- initial release
- tested on Windows 2000/XP
- searches through all interfaces and looks for the expected RAS subnet address
- removes RAS default route and replace it by your local default route
- optionally set up host/network routes for routing through RAS
June 14th, 2006 at 9:20 am
Good Job 🙂
August 23rd, 2006 at 7:09 pm
I dreamt about it, you dit it !
Thanks a lot !
April 22nd, 2009 at 6:19 pm
Thanks for make it and sharing. 🙂