JSI Tip 8923. When you use Windows Server 2003 to establish a VPN connection, you receive 'Error 633 - the modem (or other connecting device) is already in use or is not configured properly'?

Jerold Schulman

January 16, 2005

1 Min Read
ITPro Today logo in a gray background | ITPro Today

When you attempt to use a VPN (Virtual Private Network) connection on a Windows Server 2003 computer, you receive a message similar to:

Error 633 - the modem (or other connecting device) is already in use or is not configured properly.

This behavior will occur if TCP port 1723, which VPN uses to establish a connection, is being used by another program.

To resolve this issue, you must:

  • Reserve TCP port 1723.

  • Identify and kill the program that is currently using TCP port 1723.

  • Restart your Windows Server 2003 computer. This may cause the program to use a different port.

I have scripted FixVPN.bat to assist you in this task. When you open a CMD.EXE window on your Windows Server 2003 and type FixVPN, the script will:

  • Add 1723-1723 to the ReservedPorts Value Name, a REG_MULTI_SZ data type, at HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesTcpipParameters.

  • Use netstat -aon to determine the process that is using TCP port 1723.

  • Prompt you to kill the offending process.

FixVPN.bat contains:

@echo offsetlocalset key=HKLMSYSTEMCurrentControlSetServicesTcpipParameterscall :getRP>nul 2>&1@echo reg add %key% /V ReservedPorts /T REG_MULTI_SZ /D "%ReservedPorts%" /Freg add %key% /V ReservedPorts /T REG_MULTI_SZ /D "%ReservedPorts%" /F@echo.@echo Proto  Local Address          Foreign Address        State           PIDfor /f "Tokens=*" %%a in ('netstat -aon^|FIND "TCP "^|FINDSTR /L /C:":1723 "') do ( set line=%%a for /f "Tokens=4,5" %%b in ('@echo %%a') do (  if "%%c" EQU "" call :TK %%b  if "%%c" NEQ "" call :TK %%c ))endlocalgoto :EOF:getRPset ReservedPorts=##for /f "Tokens=3" %%a in ('reg query %key% /V ReservedPorts ^|FIND ""') do ( set ReservedPorts=%%a##)if "%ReservedPorts%" EQU "##" set ReservedPorts=1723-1723&goto :EOFset ReservedPorts=%ReservedPorts:=1723-1723%set ReservedPorts=%ReservedPorts:##=%goto :EOF:TK@echo %line%:TK1set /P ans=Do you want to kill PID %1^? Reply Y or N. if /i "%ans%" EQU "N" goto :EOFif /i "%ans%" NEQ "Y" goto TK1taskkill /PID %1 /F



Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like