How To Enable Ping In Windows Server 2022 Firewall

Windows Server 2022 does not respond to the ‘ping’ command by default. This is because the default configuration of Windows firewall is configured to drop all inbound ICMP traffic, but this can make network troubleshooting difficult

Here’s how you can allow ping through Windows Firewall in Windows Server 2022 with command line or through the graphical user interface (GUI).

1. Command Line

Simply run this command in command prompt or PowerShell to allow ping requests in from any source:

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

Alternatively, you can use the Windows graphical user interface to allow this:

2. Allow ping through Windows Firewall GUI

  1. First we need to open Windows Firewall, this can be done a few ways. My favorite method is to simply hit the Windows key to open start, then start typing firewall. As shown below Windows Firewall with Advanced Security should show, click this.
    Windows Server 2022 Start Menu - Open Windows Firewall

    Alternatively you can simply type ‘firewall’ and press enter in PowerShell to open the basic firewall interface

  2. Scroll down and click “Advanced Settings”.

    Windows Server 2022 firewall advanced settings

  3. From the Windows Defender Firewall with Advanced Security window that opens up, select Inbound Rules from the menu on the left.

    Windows Server 2022 Inbound Firewall Rules

  4. From the rules listed under Inbound Rules, select “File and printer Sharing (Echo Request – ICMPv4-In)” and enable the rule.

    Windows Server 2022 Firewall Enable ICMP Ping

    Note that this will only allow IPv4 requests in, you can customize the rule to only allow certain IP addresses in if required.

    If you need IPv6 then you will want to enable the “File and Printer Sharing (Echo Request – ICMPv6-In)” rule, listed just below.

  5. Once enabled the server should now respond to ping requests. From my desktop I begun to ping my Windows Server 2022 virtual machine at before enabling the rule, and then again after enabling it. You can see below that the first requests timed out, as inbound ICMP requests were disabled by default in Windows Server 2022. As soon as the ICMP rule was enabled, the ping requests start to succeed, confirming that this is working as expected.

    Windows Command Prompt Ping


By Default Windows Firewall prevents ICMP echo requests, this results in the server not responding to ping. By enabling this firewall rule we have enabled ping in Windows Server 2022, which can help us with network troubleshooting.

Leave a Comment

NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>