Enable Ping Windows Server 2012 R2



  • Our windows forex VPS online 24/7/365 & always be available to remote. 99.9% up time guaranteed. The Lowest Latency We optimized our data center for the lowest latency to London(UK) or New York(US).
  • The PING utility sends an ICMP Echo message to remote computer and receives an ICMP Echo Reply message in response. By default, Windows Firewall restricts the incoming ICMP Echo messages, preventing possible ping attacks. If you want to enable the incoming ICMP Echo messages, follow the steps below. Login to your server via Remote Desktop.
Learning has never been so easy!

1) Go to control panel from Windows charm bar or search for ‘control’. Open ‘Windows Firewall’. On other Operating. 2) Click on ‘Advanced Settings’. 3) We need to create a firewall rule to allow ICMP echo packets which used in ping command. Luckily the rule is already. I have four Windows Server 2012 servers hosted on ESXi 5.5. The first one is the firewall box with two network adapters. One with an external connection to the internet, that is shares its connection with the second internal network adapter with no external connection.

If you can't ping your brand new Windows Server 2012 R2 Core machine from another machine... Don't panic!

Ping reply is disabled by default. You just need a few easy step to enable it:

4 Steps total

Step 1: Open cmd

Step 2: Run the following command

netsh firewall set icmpsetting 8

Step 3: Ping it!

Enable ping on windows server 2012 r2

Now your machine should respond to pings - If it doesn't you have to dig deeper to solve your problem.

Step 4: Deactivate ping reply if neccesary

To disable ping replies again just issue the following command:

netsh firewall set icmpsetting 8 disable

5 Comments

  • Pimiento
    andrewcupper Sep 22, 2014 at 08:42am

    Windows says:
    IMPORTANT: Command executed successfully.
    However, 'netsh firewall' is deprecated;
    use 'netsh advfirewall firewall' instead.
    For more information on using 'netsh advfirewall firewall' commands
    instead of 'netsh firewall', see KB article 947709
    at http://go.microsoft.com/fwlink/?linkid=121488 .

    The new command is:
    netsh advfirewall firewall add rule name=”Allow Ping” protocol=icmpv4 dir=in action=allow

  • Pimiento
    craig bartley Jun 5, 2015 at 02:25am

    Thanks for your clarification, Andrew. your correction was helpful information for me. I was following my way through the help prompts and had many other parameters, but it's nice to know it can be as simple as what you've posted. Here is the command that I was using:

    netsh advfirewall firewall add rule name='allow ping' dir=in action=allow enable=yes profile=any protocol=icmpv4 interfacetype=any

    Still seemed to accomplish the goal, and I guess it's good that I've learned a bit more about the granularity of this command structure!

  • Sonora
    configt Sep 16, 2016 at 07:50pm

    My thanks to both of you for sharing. It's Friday and I guess I need to reboot my brain.

    Happy Weekend!

    John

  • Cayenne
    AndreaD Sep 20, 2016 at 06:16pm

    Thank you for helping me fix this when my boss couldn't :)

  • Poblano
    roywelch Mar 27, 2017 at 01:10pm

    This enables PING on all network connections. Is there a way to enable PING on only one connection. The server in question is a VPN server and I need to be able to ping the server from inside our network, but I do not want it to reply to Ping request from the outside world.

    Does anyone know how to setup the firewall filter for just one of the connections?

I had no idea that I would writing this article till now, but I came across a very peculiar problem where in my lab I was able access my virtual machines through RDP. But surprisingly I was not able to receive any ping responses back from the hosts.

On further analysis, I found that the default setting in Windows Server 2008 R2 and other new operating systems from Microsoft have this value set to not respond by default.

So my ping responses used to always end with Request timeout error.

In this example, I am trying to ping one of my VM’s with the IP address 192.168.0.205.

As you can see above that the request timed out. But there is an easy resolution to this.

Enable Ping Windows Server 2012 R2

Enable Ping Windows Server 2012 R2 Server

First, log in to the server that is not responding to ping requests.

After logging, select Windows Firewall with advanced security from the Administrative Tools.

Click on Inbound rules and search for File and Print Sharing(Echo Request-ICMPv4 In) rule.

Right click on the rule and select Enable Rule.

Now you will see the green colour check mark on the Firewall rule. If you use IPv6 in your environment, you might want to enable the rule below the one shown above as well.

That’s it! You have successfully enabled the ping on the server in question in few easy steps.

Enable Ping Windows Server 2012 R2

Now you can see that I am receiving successful ping responses from the machine.

Enable with Powershell

How To Enable Ping Command In Windows Server 2012 R2

Well, I love doing things with Powershell, as there is so much ease and flexibility in the ways that I can accomplish tasks.

Enable Ping On Windows Server 2012 R2

In this particular example, you will need to have a Windows Server 2012 / 2012R2 Operating Systems. The reason behind this is that Powershell 3.0 comes with certain modules that are present only on these OS’s. The module that I am talking about is NetSecurity.

Enable

So I have a VM built with a copy of Windows Server 2012 R2. And the IP address that I have assigned is 192.168.0.210

The way that we are going to enable is shown below:

First, you need to Import the Powershell module NetSecurity
Then Set the value for File an Print sharing rule for ICMPv4 in Inbound Rules of Windows Firewall to true.

So first I made to query to list the rules belonging to the RuleGroup of File and Print Sharing using Get-NetFirewallRule and by select method I chose to display only the DisplayName.

Then, I chose the rule specific to IPv4 and set it to enable by Set-NetFirewallRule command.

You can verify the same from the GUI of Windows Firewall as well.

Now, you can see that I do get proper ping response back from the server.

I hope that this will help you if you ever come across such issues in future. Thank you for reading!