Windows server 2019 打开ping的方法

时间:2023-01-10 22:00:37

​在windows server 2019 中,用ping 服务器ip地址时,会ping不通,是因为防火墙阻止PING导致的,需要放通PING。

 

Windows server 2019 打开ping的方法

解决办法:

一、命令行方式

进入服务器后 点击 开始——运行 输入命令:

netsh firewall set icmpsetting 8

netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow

 

二、防火墙设置

1. 进入控制面板——>管理工具——>找到 “高级安全 Windows 防火墙”

2. 点击 入站规则

3. 找到 回显请求-ICMPv4-In (Echo Request – ICMPv4-In)

4. 右键 点击规则 点击“启用规则(Enable)”

 

Windows server 2019 打开ping的方法

 

配置 ICMP 设置   旧命令  新命令

netsh firewall set icmpsetting 8

netsh advfirewall firewall add rule name="ICMP Allow incoming V4 echo request" protocol=icmpv4:8,any dir=in action=allow

 

netsh firewall set icmpsetting type=ALL mode=enable

netsh advfirewall firewall add rule name= "All ICMP V4" protocol=icmpv4:any,any dir=in action=allow

 

netsh firewall set icmpsetting 13 disable all  

netsh advfirewall firewall add rule name="Block Type 13 ICMP V4" protocol=icmpv4:13,any dir=in action=block

 ​​https://docs.microsoft.com/zh-CN/troubleshoot/windows-server/networking/netsh-advfirewall-firewall-control-firewall-behavior​