Sunday, May 20, 2012
Windows VPN Connection with automatic routes added without default gateway option
type c:\windows\vpn.bat
@echo off
rasdial VPN_CONNECTION_NAME USERNAME PASSWORD
for /f "tokens=15 delims= " %%A in ('ipconfig ^| find "192.168.200"') do @set GW=%%A
route add 192.168.45.0 mask 255.255.255.0 %GW%
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment