How to Enable Ping on Windows Server 2008 and 2012

Category: Windows
Posted: September 13, 2011
Author: Antonio

Installed Windows Server 2008 and it doesn’t respond to ping from the network? No problem: incoming ping is simply blocked by the Windows firewall by default. There are several ways to enable it.

Enabling ping on Windows Server 2008: network discovery and file sharing

Below are three ways for Windows Server 2008, plus a separate section for Windows Server 2012.

1. The simplest: network discovery

Start → Settings → Control Panel → Network and Sharing Center. Turn on Network discovery and File sharing — ping is allowed along with them.

2. Windows Firewall with Advanced Security

Start → Settings → Control Panel → Administrative Tools → Windows Firewall with Advanced Security. Under Inbound Rules, find the ICMPv4 echo request rule and enable it.

ICMPv4 echo request rule in Windows Server 2008 firewall

3. From the command line

Run the command prompt as administrator. The old form of the command:

netsh firewall set icmpsetting 8

It runs, but Windows warns that netsh firewall is deprecated. The proper form for Windows Server 2008 and 2008 R2 is netsh advfirewall:

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

Can you restrict who pings the server?

A reader asked this in the comments. Ping doesn’t check a login and password — ICMP has no authentication. You can only restrict by address: in the rule’s properties, on the Scope tab, list the IP addresses or subnets allowed to ping. If you have a dynamic IP, this won’t work. In that case it’s easier to check that the server is up not with ping but by connecting to some open port.

Windows Server 2012 and later

On Windows Server 2012, incoming ping is blocked by default as well. The easiest way to enable it is this command (as administrator):

netsh advfirewall firewall add rule name="Ping v4" ^
 protocol=icmpv4:8,any dir=in action=allow

Allowing ping on Windows Server 2012 from the command line

Once it answers OK., the rule takes effect immediately and the server responds to ping.

Through the GUI: Network and Sharing Center → Windows Firewall → Advanced settings → Inbound Rules. Find the built-in rule with “Echo Request – ICMPv4-In” in its name, right-click → Enable Rule.

Enabling the ICMPv4 echo request rule in Windows Server 2012 firewall

You can enable the same built-in rule in PowerShell:

Enable-NetFirewallRule -Name FPS-ICMP4-ERQ-In
Related posts:

Leave a Comment

Copying content from this site is allowed only with a direct link to the source - https://nemcd.com