How to Allow Pings (ICMP Echo Requests) Through Your Windows Firewall
If you want to see whether your Pc is live or not, you cannot use the ping command from any other device if you’ve enabled Windows firewall with default settings.
The ping command only works by sending ‘Internet Control Message Protocol (ICMP)’, also known as special packets, echo requests for targeting any device. Next, wait for the same device to send back ICMP echo reply packet.
This lets you test activation of the network connected device as well as allows you to measure the displays and response time.
Windows Firewall with advanced security, by default blocks ICMP echo requests from network. Of course, you can disable the firewall for testing purposes. However, you have a simpler solution for this; you can create an exception which allows ICMP request via firewall. These instructions would work for Windows 10 and Windows 8.
Opening ports and creating exceptions through your firewall opens up security risk, so you’ve to be cautious. If you allow ping requests, it allows you to block anything you don’t need.
Allowing Ping Requests by using Command Prompt
The fastest way for creating an exception for Ping Requests is with using the Command Prompt. You’ll require admin privileges for opening it. Press ‘Windows+X’ 7 then select ‘command Prompt (admin)’. Next, right-click the resulting entry and select ‘Run as Administrator’.
For enabling Ping Requests, you need to create two exceptions which allow traffic through the firewall for:
- ICMPv4 requests
- ICMPv6 requests
For creating ICMPv4 requests, copy-paste or type the following command at the prompt and hit enter.
netsh advfirewall firewall add rule name=”ICMP Allow incoming V4 echo request” protocol=icmpv4:8,any dir=in action=allow
For creating ICMPv6 exception, you’ll have to use this command:
netsh advfirewall firewall add rule name=”ICMP Allow incoming V6 echo request” protocol=icmpv6:8,any dir=in action=allow
You don’t have to restart your computer or laptop. The changes will take place immediately. You will get an actual result if you ping your laptop or PC from a remote device.
For displaying Ping Requests again, you will have to disable both the exceptions that you have created.
- For ICMPv4 exception, copy-paste or type the following command at prompt and then hit enter:
netsh advfirewall firewall add rule name=”ICMP Allow incoming V4 echo request” protocol=icmpv4:8,any dir=in action=block
- For ICMPv6 exception, copy-paste or type the following command at prompt and then hit enter:
netsh advfirewall firewall add rule name=”ICMP Allow incoming V6 echo request” protocol=icmpv6:8,any dir=in action=block
Whenever the requests are blocked, Ping Requests to your PC will get a ‘Request Timed Out’ error.
You should note that while using the above commands, you are allowed to use any name you want for the rule. However, when you disable a rule, you’ll have to use the same rule name, which you used when you created it.
In case, you forget the rule name, use the following command for seeing the list of all rules:
netsh advfirewall firewall show rule name=all
There will be a lot of rules available, but you’ll find the rules that you have created at the top.