How To Allow Ping Through Windows Firewall
ICMP, also known as PING, is commonly used by system administrators to check whether the computers (and other network devices) are alive or not.
Firewall in Windows 10 blocks ICMP responses out of the box. To allow ICMP in Windows, we need to create two firewall rules. One for IPv4 and one for IPV6.
We can achieve this using either GUI or Command prompt.
Using PowerShell to Allow Pings
The easiest way is to run the following two commands in a PowerShell window:
netsh advfirewall firewall add rule name="Allow ICMPv4" protocol=icmpv4:8,any dir=in action=allow netsh advfirewall firewall add rule name="Allow ICMPv6" protocol=icmpv6:8,any dir=in action=allow
To open a PowerShell window, right-click on the Start button and select Windows PowerShell (Admin) from the menu.
Once the command window opens, run the two commands we provided above.
Your Windows PC/Server will now respond to ping requests. If you want to block pings again, remove those two firewall rules using the following two commands:
netsh advfirewall firewall delete rule name="Allow ICMPv4" netsh advfirewall firewall delete rule name="Allow ICMPv6"
Using Windows Defender Firewall
If you’re not comfortable with the command line, use the GUI to allow pings through the Windows firewall.
Click the Start button and type firewall. From the search result, select Window Defender Firewall with Advanced Security. In the Firewall App, right-click Inbound Rules and choose New Rule from the contextual menu.
On the first screen, select Custom rule type, click Next, and then choose All Programs. Click Next again.
From the Protocol Type drop-down menu, select ICMPv4 and click Next.
On the Scope screen, choose Any IP Address, click Next and choose Allow the connection. In the Profile screen, leave all three firewall profiles checked.
Finally, give a name to the Firewall rule and click Finish to complete the wizard.
This rule will allow ICMPv4 traffic through the firewall. To allow ICMPv6 traffic, repeat the same procedure, but in the Protocol and Ports screen, select ICMPv6.
And that is it. You can use the above methods to allow pings in any windows operating system, including Windows 10, 11, and Server.