This is just a quick guide to enabling a server to respond to ping, the default setting in Windows Server 2012 (R2 included) is to not respond. This is how you do it:
GUI – Graphical User Interface
Open Control Panel, then select System and Security by clicking on that header:
Select Windows Firewall:
Now select and click on Advanced Settings:
In Windows Firewall with Advanced Security click on Inbound rules:
Scroll down to File and Printer sharing (Echo request – ICMPv4-In):
Right-click on the rule and select Enable rule:
Make sure that the icon (the rule) turns green:
Done, close down the ‘Windows Firewall with Advanced Security’ windows and then the Control Panel. Verify functionality by pinging the servers own IP address from a command or PowerShell prompt.
PowerShell
Enter the following commands (one command each line) to enable the same rule enabled by using the GUI method:
Import-Module NetSecurity Set-NetFirewallRule -DisplayName “File and Printer Sharing (Echo Request – ICMPv4-In)” -enabled True
The above commands enables the existing rule, below will create a new rule that allows ICMPv4/Ping and enable it):
Import-Module NetSecurity New-NetFirewallRule -Name Allow_Ping -DisplayName “Allow Ping” -Description “Packet Internet Groper ICMPv4” -Protocol ICMPv4 -IcmpType 8 -Enabled True -Profile Any -Action Allow
For IPv6 Ping you obviously enable the ICMPv6 Inbound Rule...
Thats all there is to it!