How to Enable Ping (ICMP) on Windows Server 2016 / 2019 / 2022 Firewall
By default, Windows Server blocks ICMP Echo Requests, which are used by the ping command. To allow your server to respond to ping requests without disabling the firewall, you simply need to enable an existing firewall rule.
Evans
Last Update 2 months ago
Press Win + S and search for Control Panel, then open it.
Click on Windows Defender Firewall.
On the left menu, click Advanced settings to open the Windows Defender Firewall with Advanced Security window.

In the left pane, click on Inbound Rules.
Scroll down and locate the rule named:
File and Printer Sharing (Echo Request - ICMPv4-In)Right-click on it and select Enable Rule.
N/B If you want to enable IPv6 ping as well, repeat the same for:
File and Printer Sharing (Echo Request - ICMPv6-In)

This rule allows the server to respond to ping (ICMP) requests from other machines — useful for network diagnostics, uptime monitoring, or server health checks — while keeping other firewall protections intact.
Once the rule is enabled, your server will respond to ping your-server-ip from other devices on the network or internet (depending on firewall/network policy).
