A new Windows server does not answer ping, although it runs and Remote Desktop works. That is not a fault: the Windows firewall ignores ping until you allow it. This guide shows how to allow it, for everybody or only for your own addresses, and how to switch it off again.
The examples use Windows Server 2025. Run the commands in PowerShell as Administrator: right-click the Start button and choose Terminal (Admin).
1. Allow Ping
Enable-NetFirewallRule -DisplayName "File and Printer Sharing (Echo Request - ICMPv4-In)"
The rule works at once. Despite its name it does not switch on file sharing; it only lets the server answer ping. Test it from your own computer with the address of your server:
ping 203.0.113.10
Before the change every line says Request timed out. Now the server answers with Reply from and a time in milliseconds.
2. Allow Ping Only From Your Own Address
If only your computer or your monitoring should get an answer, add the address to the rule:
Set-NetFirewallRule -DisplayName "File and Printer Sharing (Echo Request - ICMPv4-In)" -RemoteAddress 203.0.113.25
Several addresses are separated by commas. -RemoteAddress Any allows everybody again.
3. Switch It Off Again
Disable-NetFirewallRule -DisplayName "File and Printer Sharing (Echo Request - ICMPv4-In)"
From then on the server is silent again.
Good to Know
- In a window: press Windows key + R, type
wf.msc, open Inbound Rules, right-click the rule with this name and choose Enable Rule. - Another rule with a similar name, Core Networking Diagnostics - ICMP Echo Request (ICMPv4-In), answers only computers in the same local network. It does not help for a ping from the Internet.
- No answer to ping does not mean that the server is down. Test the port of Remote Desktop instead: See Which Programs Listen on Your Windows Server and Which Ports Are Open. If Remote Desktop does not connect: Remote Desktop Does Not Connect: Check and Fix It From the Console.
- IPv6 has its own rule with the same name and
ICMPv6-Inat the end.
