按【Win+R】键打开“运行”对话框,输入“notepad”打开记事本,编写以下的批处理代码,然后将其保存名为“protectfromddos.bat”的批处理文件。 在命令行状态下切换到批处理所在的目录,输入“protectfromddos.bat”并按回车键,即可在一定程度上增强系统抗击DOS攻击。 @echo off echo Windows Registry Editor Version 5.00 >temp.reg echo 正在配置系统相关参数,以提高系统抗击DOS攻击能力…… echo. echo [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters] >>temp.reg echo "EnableICMPRedirect"=dword:00000000 >>temp.reg echo "DeadGWDetectDefault"=dword:00000001 >>temp.reg echo "DontAddDefaultGatewayDefault"=dword:00000000 >>temp.reg echo "EnableSecurityFilters"=dword:00000001 >>temp.reg echo "AllowUnqualifiedQuery"=dword:00000000 >>temp.reg echo "PrioritizeRecordData"=dword:00000001 >>temp.reg echo "ReservedPorts"=hex(7):31,00,34,00,33,00,33,00,2d,00,31,00,34,00,33,00,34,00,00,00,00,00 >>temp.reg echo "SynAttackProtect"=dword:00000002 >>temp.reg echo "EnablePMTUDiscovery"=dword:00000000 >>temp.reg echo "NoNameReleaseOnDemand"=dword:00000001 >>temp.reg echo "EnableDeadGWDetect"=dword:00000000 >>temp.reg echo "KeepAliveTime"=dword:00000BB8 >>temp.reg echo "PerformRouterDiscovery"=dword:00000000 >>temp.reg echo 成功增强系统对抗DOS攻击能力! regedit /s temp.reg del /q /f temp.reg >nul