Allow Ping Requests by Using the Command Prompt

Enable exception:

Run Command Prompt with “Run as administrator” and type into this:

ICMPv4

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

ICMPv6

netsh advfirewall firewall add rule name=”ICMP Allow incoming V6 echo request” protocol=icmpv6:8,any dir=in action=allow

Disable exception:

ICMPv4

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

ICMPv6

netsh advfirewall firewall add rule name=”ICMP Allow incoming V6 echo request” protocol=icmpv6:8,any dir=in action=block

Command to list all rules:

netsh advfirewall firewall show rule name=all