A Windows PPTP server is vulnerable to denial of service attacks via the PPTP control channel.

I have scripted PPTPOnly.bat to force the PPTP protocol to only accept calls from client IP address that you specify.

The syntax for using PPTPOnly.bat is:

PPTPOnly IPAddress1 Mask1 \[IPAddress2 Mask2 ... IPAddressN MaskN\]

where each IPAddress(i) and Mask(i) pair specifies a valid client IP address, with mask, that is allowed to be authenticated by the PPTP server. No octet should have extraneous leading zeros.

The PPTPOnly.bat script works by locating the registry sub-key of HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class\\{4D36E972-E325-11CE-BFC1-08002bE10318\} that defines the WAN Miniport (PPTP) driver, displaying the sub-key, and setting its' AuthenticateIncomingCalls Value Name, a REG_DWORD data type, to 1. It them sets the ClientIpAddresses and ClientIpMasks Value Names, both REG_MULTI_SZ data types, with the IPAddress(i) and Mask(i) values that you specify, maintaining the one-to-one mapping between IP address and mask that is required.

NOTE: If AuthenticateIncomingCalls is set to 1 and you remove all the IP addresses from ClientIpAddresses, no client will be able to connect.

NOTE: Each time that you run PPTPOnly.bat, it adds the specified parameters to the existing entries.
Running PPTPOnly IPAddress1 Mask1 and PPTPOnly IPAddress2 Mask2 is equivalent to
running PPTPOnly IPAddress1 Mask1 IPAddress2 Mask2.

PPTPOnly.bat contains:

<font size="-2">
@echo off
if \{%2\}<h1><a name="_echo_Syntax_PPTPOnly_IPAddress1_Mask1_IPAddress2_Mask2_IPAddressN_MaskN_amp_goto_EOF_setlocal_call_tstparm_1_2_gt_nul_2_gt_amp_1_if_parmok_EQU_Y_goto_doit_echo_First_IP_address_and_Mask_pair_is_invalid_PPTPOnly_will_not_run_echo_PPTPOnly_endlocal_goto_EOF_doit_set_fnd_FINDSTR_L_I_C_set_qry_reg_query_HKLM_SYSTEM_CurrentControlSet_Control_Class_4D36E972_E325_11CE_BFC1_08002bE10318_S_set_sub_4D36E972_E325_11CE_BFC1_08002bE10318_for_f_Tokens_a_in_qry_fnd_sub_do_set_line_a_call_parse_endlocal_goto_EOF_tstparm_set_parmok_Y_set_parm_1_for_f_Tokens_1_4_Delims_i_in_echo_parm_do_set_a_p1_1000_i_1000_set_a_p2_1000_j_1000_set_a_p3_1000_k_1000_set_a_p4_1000_l_1000_if_parm_NEQ_p1_p2_p3_p4_set_parmok_N_set_parm_2_for_f_Tokens_1_4_Delims_i_in_echo_parm_do_set_a_p1_1000_i_1000_set_a_p2_1000_j_1000_set_a_p3_1000_k_1000_set_a_p4_1000_l_1000_if_parm_NEQ_p1_p2_p3_p4_set_parmok_N_goto_EOF_parse_if_line_0_18_NEQ_HKEY_LOCAL_MACHINE_goto_EOF_if_line_96_1_NEQ_goto_EOF_if_line_101_1_EQU_goto_EOF_set_key_line_set_skey_key_HKEY_LOCAL_MACHINE_HKLM_set_okkey_for_f_Tokens_1_2_b_in_reg_query_skey_fnd_DriverDesc_fnd_REG_SZ_fnd_WAN_Miniport_PPTP_do_set_okkey_skey_if_not_defined_okkey_goto_EOF_echo_The_WAN_Miniport_PPTP_sub_key_is_key_reg_add_okkey_V_AuthenticateIncomingCalls_T_REG_DWORD_D_1_F_for_f_Tokens_1_2_x_in_reg_query_okkey_V_ClientIpAddresses_fnd_REG_MULTI_SZ_do_set_CIA_z_if_defined_CIA_set_CIA_CIA_0_0_if_CIA_EQU_0_set_CIA_for_f_Tokens_1_2_x_in_reg_query_okkey_V_ClientIpMasks_fnd_REG_MULTI_SZ_do_set_CIM_z_if_defined_CIM_set_CIM_CIM_0_0_if_CIM_EQU_0_set_CIM_loop_if_2_">\{\} @echo Syntax: PPTPOnly IPAddress1 Mask1 \[IPAddress2 Mask2 ... IPAddressN MaskN\]&goto :EOF
setlocal
call :tstparm %1 %2>nul 2>&1
if "%parmok%" EQU "Y" goto doit
@echo First IP address and Mask pair is invalid. PPTPOnly will not run.
@echo PPTPOnly %*
endlocal
goto :EOF
:doit
set fnd=FINDSTR /L /I /C:
set qry=reg query "HKLM\SYSTEM\CurrentControlSet\Control\Class\\{4D36E972-E325-11CE-BFC1-08002bE10318\}" /S
set sub=\{4D36E972-E325-11CE-BFC1-08002bE10318\}
for /f "Tokens=*" %%a in ('%qry%^|%fnd%"%sub%"') do (
 set line=%%a
 call :parse %*
)
endlocal
goto :EOF
:tstparm
set parmok=Y
set parm=%1
for /f "Tokens=1-4 Delims=." %%i in ('@echo %parm%') do (
 set /a p1=1000%%i%%1000
 set /a p2=1000%%j%%1000
 set /a p3=1000%%k%%1000
 set /a p4=1000%%l%%1000
)
if "%parm%" NEQ "%p1%.%p2%.%p3%.%p4%" set parmok=N
set parm=%2
for /f "Tokens=1-4 Delims=." %%i in ('@echo %parm%') do (
 set /a p1=1000%%i%%1000
 set /a p2=1000%%j%%1000
 set /a p3=1000%%k%%1000
 set /a p4=1000%%l%%1000
)
if "%parm%" NEQ "%p1%.%p2%.%p3%.%p4%" set parmok=N
goto :EOF
:parse
if "%line:~0,18%" NEQ "HKEY_LOCAL_MACHINE" goto :EOF
if "%line:~96,1%" NEQ "\" goto :EOF
if "%line:~101,1%" EQU "\" goto :EOF
set key=%line%
set skey=%key:HKEY_LOCAL_MACHINE=HKLM%
set okkey=
for /f "Tokens=1,2*" %%b in ('reg query %skey%^|%fnd%"DriverDesc"^|%fnd%"REG_SZ"^|%fnd%"WAN Miniport (PPTP)"') do (
 set okkey=%skey%
)
if not defined okkey goto :EOF
@echo The WAN Miniport (PPTP) sub-key is %key%
reg add %okkey% /V AuthenticateIncomingCalls /T REG_DWORD /D 1 /F
for /f "Tokens=1,2*" %%x in ('reg query %okkey% /V ClientIpAddresses^|%fnd%"REG_MULTI_SZ"') do (
 set CIA=%%z
)
if defined CIA set CIA=%CIA:\0\0=%
if "%CIA%" EQU "\0" set CIA=
for /f "Tokens=1,2*" %%x in ('reg query %okkey% /V ClientIpMasks^|%fnd%"REG_MULTI_SZ"') do (
 set CIM=%%z
)
if defined CIM set CIM=%CIM:\0\0=%
if "%CIM%" EQU "\0" set CIM=
:loop
if \{%2\}</a></h1>\{\} goto :loopend
call :tstparm %1 %2>nul 2>&1
if "%parmok%" EQU "Y" goto loop1
@echo The following IP address and Mask pair is invalid, and will NOT be added: %1 %2
goto loop2
:loop1
if defined CIA set CIA=%CIA%\0
set CIA=%CIA%%1
if defined CIM set CIM=%CIM%\0
set CIM=%CIM%%2
:loop2
shift
shift
goto loop
:loopend
reg add %okkey% /V ClientIpAddresses /T REG_MULTI_SZ /D "%CIA%" /F
reg add %okkey% /V ClientIpMasks /T REG_MULTI_SZ /D "%CIM%" /F
</font>