@echo off
(
echo Windows Registry Editor Version 5.00
echo.
echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
echo "IPEnableRouter"=dword:00000001
) > %temp%\iproute.reg
start "" %temp%\iproute.reg
del %temp%\iproute.reg >nul
netsh routing ip nat install
net stop RemoteAccess >nul 2>nul
net start RemoteAccess
netsh interface show interface
to list all available interfaces. Some interfaces like Cisco VPN are not visible until you have a connection, so you might have to start that connection first.
@echo off
set routenet=172.16.1.0
set routemask=255.255.255.0
(
echo nat add interface name="Cisco VPN" mode=full
echo nat add interface name="LAN" mode=private
echo nat add interface name="internal" mode=private
echo add persistentroute dest=%routenet% mask=%routemask% name="Cisco VPN" proto=static pref=0 metric=1 view=both
) | netsh -c "routing ip"
psexec \\RRAS -accepteula -u RRAS\rras -p rras ^
-e "C:\Programme\Cisco Systems\VPN Client\vpngui.exe" -c -user %login% -pwd %pwd% %ConnectionName%
psexec is a tool of the famous free Sysinternals PsTools suite at www.sysinternals.com (now belonging to Microsoft).
psexec \\RRAS -accepteula -u RRAS\rras -p rras ^
-e netsh interface set interface %ConnectionName% enabled connected
Have a question about something in this article? You can receive help directly from the article author. Sign up for a free trial to get started.
Comments (1)
Author
Commented:Juniper's JunOS Pulse can be added to the VPNs testified to work with RRAS.
Not working are:
Cisco AnyConnect Secure Mobility Client (the SSL VPN replacing the IPSec one, which is EOL now)
Juniper Network Connect (SSL VPN)