HOWTO enable/disable PING on Windows 10 firewall by command prompt

In windows 10, the firewall blocks PING command messages by default.

I presume that this setting is to improve the security of our PCs, but sometimes we need it because we have to investigate about network problems, …

Since I find that wandering into hundreds of firewall rules quite annoying, then I found the command lines to enable/disable the related firewall rules from an Administrative Command Prompt.

To enable PING IPv4 & IPv6, type the following commands:

netsh advFirewall Firewall add rule name="PING IPv4" protocol=icmpv4:8,any dir=in action=allow
netsh advFirewall Firewall add rule name="PING IPv6" protocol=icmpv6:8,any dir=in action=allow

To disable them, type the following commands:

netsh advFirewall Firewall add rule name="PING IPv4" protocol=icmpv4:8,any dir=in action=block
netsh advFirewall Firewall add rule name="PING IPv6" protocol=icmpv6:8,any dir=in action=block
Print Friendly, PDF & Email