By default, Windows Firewall blocks ping requests on your network. i.e., if you try to ping a device on your network from your Windows device, you will see the ‘Request timed out’ response.
Ping is a simple but powerful networking tool that lets you test whether a device is reachable on a network, and it’s often used for troubleshooting and diagnostic purposes. By allowing ping traffic through the Windows Firewall, you can make sure that your network is working properly and perform network troubleshooting more effectively.
In this guide, let me show you the steps to allow ping through Windows Firewall in two different ways. You can follow any of the methods shown below to enable ping in Windows Firewall.
Table of contents:
- How to allow ping in Windows Firewall
- How to block ping requests in Windows Firewall
- How to check if ping is blocked in Windows Firewall
- Why does Windows Firewall block ping requests
- Conclusion
How to Allow Ping in Windows Firewall
There are three ways to make sure Windows Firewall allows ping requests. They are using the Windows Firewall application and Command Prompt. I will show both methods. You can follow any of the methods to allow ping requests on your network through Windows Firewall.
1.1 Create an inbound rule to allow ping through Windows Firewall
The easiest way to allow ping requests is by creating an inbound rule in Windows Firewall. The good thing is that the inbound rule gives you granular control over programs and IP addresses that can send ping requests through Windows Firewall. Moreover, it also makes it easy to modify and manage to rule as and when needed.
Press the Start key on your keyboard to open the Start menu. Next, search for Windows Firewall with Advanced Security and click on the result. This will open the Windows Firewall management screen.
In the Windows Firewall with Advanced Security screen, click the Inbound Rules option on the left sidebar. This is where you will find all the inbound rules for your Windows Firewall. Here, click the New Rule option on the right sidebar. This option lets you create a new inbound rule.
Since we want to allow ping requests, we have to create a custom rule. So, select the Custom option in the New Inbound Rule wizard window. Click the Next button to continue.
If you want to allow all programs to receive ping requests, select the All Programs option. On the other hand, if you only want to allow a specific program, select the ‘This program path’ option, click the Browse button, and select the application you want to allow. Click the Next button to continue.
Select ICMPv4 from the Protocol type dropdown menu and then click the Customize button. This allows you to further customize the protocol to allow ping requests.
Select the Specific ICMP types option and then select the Echo Request checkbox. Click the Ok button. That way, you will only allow pings under ICMP and block all others. Click the Next button in the main window.
Select Any IP address option from the Local and Remote IP addresses sections. If you only want to allow specific IP addresses, select ‘These IP addresses’ from the Remote and Local IP addresses section and type in the IP addresses. Type each IP address in a separate line. Click the Next button.
Select the Allow the connection option and click on the Next button. This option enables the inbound rule we are creating.
Select the profiles where you want the rule to apply. For instance, if you want to allow ping through Windows Firewall in just the private network, select only the Private checkbox. In my case, I’m selecting all three profiles.
Give the inbound rule a name and click the Finish button. Give it a descriptive name so that the rule is easily recognizable in the future.
As soon as you do that, the new inbound rule to allow ping will appear in the Windows Firewall rules screen. The rule is enabled.
From now on, the ping requests are enabled in Windows Firewall and any computer can ping request you according to the inbound rules.
1.2 Command to allow ping in Windows Firewall
If you want to quickly enable Windows Firewall to allow ping to your computer, you can execute a single-line command in the Command Prompt window. Here’s how.
First, right-click on the Start icon on the taskbar and select the Terminal (Admin) option.
In the Terminal window, click the dropdown icon on the title bar and select Command Prompt. If you want, you can also search for Command Prompt in the Start menu and select the Run as Administrator option to open it with admin rights.
In the Command Prompt tab/window, run the below command. It will configure the inbound firewall rule and enable it.
netsh advfirewall firewall add rule name="WindowsLoop Allow Ping Requests ICMPv4" protocol=icmpv4:8,any dir=in action=allow
Close the Command Prompt window. From now on, your computer can receive ping requests from other devices on the network.
How to Block Ping Requests in Windows Firewall
If you don’t want other devices on the network to ping your computer, you can disallow or block ping requests in Windows Firewall. Under certain circumstances, blocking ping requests provide an extra layer of network security because the originating device won’t know if your device is alive and active on the network via ping requests.
Here’s how to block ping requests in Windows Firewall.
Via Windows Firewall:
- Press the Start key on your keyboard.
- Search and open Windows Firewall and Advanced Security.
- Select Inbound Rules from the left sidebar.
- Find and right-click on the ping requests inbound rule.
- Select the Disable Rule option.
- With that, the ping requests in Windows Firewall.
- Close the Windows Firewall window.
Note: If you no longer need the inbound rule, you can delete it by right-clicking on the rule and selecting the Delete option.
Via Command Prompt:
- Right-click on the Start icon on the taskbar.
- Select the Terminal (Admin) option.
- Click on the dropdown icon on the title bar.
- Select the Command Prompt option.
- Run the below command to block ping requests.
netsh advfirewall firewall add rule name="WindowsLoop Allow Ping Requests ICMPv4" protocol=icmpv4:8,any dir=in action=block
- Close the Terminal window.
Note: If you want to you also block a program in Windows Firewall
How to Check If Ping Is Allowed in Windows Firewall
If you want to check whether ping is allowed in Windows Firewall, you can simply ping to your computer from another device and see if your computer responds. To do that, run the ‘ping IPAddress’ command, where you must replace the ‘IPaddress’ with the actual IP address of your computer.
If the response says ‘Request timed out’ when you ping then your computer’s Windows Firewall is blocking ping requests.
If you see a replay from your device, like shown below, the ping requests are allowed in your Windows Firewall.
Why Does Windows Firewall Block Ping Requests
As most of you know, Windows Firewall is designed to protect your computer from unauthorized access and potential threats from the internet. One way that it does this is by blocking certain types of network traffic, including ping requests.
If you don’t know, Ping requests are a type of network traffic that can be used to probe a computer or network for vulnerabilities, which attackers could potentially exploit.
To reduce the potential attack surface, Windows Firewall, by default, blocks all ping requests coming to your Windows device.
However, in some cases, you may need to allow ping traffic through the firewall. In those cases, follow the steps shown above to allow ping in Windows Firewall. When you no longer need it, don’t forget to block the inbound rule that allows ping requests.
Allowing Ping Requests in Windows Firewall — Conclusion
As you can see, though the ping requests are blocked by default in Windows Firewall for security reasons, you can allow them with a simple inbound rule. You can either do it directly in the Windows Firewall or execute a single-line command provided above. No matter which method you choose, ping requests are allowed once you configure the rule. I recommend you follow the first method, which gives you more control and customization options.
Of course, if you no longer need to allow ping requests in Windows Firewall, disable the firewall rule so that the ping requests are blocked. That way, you don’t have to worry about potential security issues.
—
That is all. It is that simple to allow ping requests in Windows Firewall.
I hope this simple and easy Windows how-to guide helped you.
If you are stuck or need help, email me, and I will try to help as much as possible.
If you like this article, check out how to back up Windows Firewall settings.
No, neither the rule as explained here nor the command as pointed out here work on Windows 10.
The command is missing some parameter or flag. The rule does allow ping to work.
It always used to work on window without this additional rule until this recent update.
What is stopping it and how do one find out?
I just tested it on my end and it worked fine. Make sure you create the firewall inbound run on the computer where you want to receive the ping. You should not create this rule in the computer you are sending the ping from.