Few months ago somebody asked how to route only the neccessary traffic through PPTP. I forgot to answer as I promised.
Now i needed the script again because i had to reinstall my win2k. I attach the script i use to route the traffic.
This script is tested only in win2k. Hope this helps you all [:)]
Any comments and fixes are welcome. At least is works for me.
REM ROUTING PPTP TRAFFIC
REM
REM By default w2k routes all traffic though PPTP when VPN in active
REM
REM with this little script you can route the traffic though VPN interface
REM when it is neccessary
REM
REM Configure your VPN, open the connection and run this script.
REM You need to run it once only.
REM
REM Remember uncheck option 'Use default gateway of remote network'
REM it messes up whole routing
REM
REM Jouni Rajala
REM jouni.rajala@kolumbus.fi
REM ------------------------
REM SETTINGS
REM ------------------------
REM RWIP is the IP address you get from astaro
set RWIP=
REM DEFAULTGW is your own gateway you want to use when accessing internet
set DEFAULTGW=
REM VPN network is the private network of your roadwarrior-ip
set VPNNET=
set VPNMASK=
REM REMOTE network is the network you want to access through PPTP
set REMOTENET=
set REMOTEMASK=
REM ------------------------
REM THE ADDING OF THE ROUTES
REM ------------------------
route DELETE 0.0.0.0
route DELETE %VPNNET%
route DELETE %REMOTENET%
route -p add %VPNNET% mask %VPNMASK% %RWIP%
route -p add %REMOTENET% mask %REMOTEMASK% %RWIP%
route add 0.0.0.0 mask 0.0.0.0 %DEFAULTGW%
REM ---------------------------------------------------
REM TEST ROUTING
REM ----------------------------------------------------
tracert -d
tracert -d
This thread was automatically locked due to age.