mirror of
https://github.com/bin456789/reinstall.git
synced 2025-10-05 14:34:53 +00:00
core: 支持修改 ssh rdp web 端口
This commit is contained in:
21
windows-allow-ping.bat
Normal file
21
windows-allow-ping.bat
Normal file
@@ -0,0 +1,21 @@
|
||||
@echo off
|
||||
mode con cp select=437 >nul
|
||||
setlocal EnableDelayedExpansion
|
||||
|
||||
rem https://learn.microsoft.com/troubleshoot/windows-server/networking/netsh-advfirewall-firewall-control-firewall-behavior#command-example-4-configure-icmp-settings
|
||||
rem 旧版命令 netsh firewall set icmpsetting 8 对应的配置是:文件和打印机共享(回显请求 - ICMPv4-In)
|
||||
|
||||
set ICMPv4EchoTypeNum=8
|
||||
set ICMPv6EchoTypeNum=128
|
||||
|
||||
for %%i in (4, 6) do (
|
||||
netsh advfirewall firewall add rule ^
|
||||
name="ICMP Echo Request (ICMPv%%i-In)" ^
|
||||
dir=in ^
|
||||
action=allow ^
|
||||
program=System ^
|
||||
protocol=ICMPv%%i:!ICMPv%%iEchoTypeNum!,any
|
||||
)
|
||||
|
||||
rem 删除此脚本
|
||||
del "%~f0"
|
Reference in New Issue
Block a user