Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Server Fault tells that the new syntax to enable ping on Windows Server 2008 is

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

but this doesn't work with Windows 7. Here I get

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

A specified value is not valid.

Usage: add rule name=<string>
...

What is the correct new syntax?

share|improve this question
    
You could try adding it through the GUI? Control Panel --> System and security --> Windows Firewall --> Advanced settings --> Inbound rules --> New rule --> custom rule – jmreicha Oct 4 '11 at 13:35
    
Windows ships with a firewall rule for that, btw. Confusingly, it’s in the File and Printer Sharing category. Its name depends on your OS language. – Daniel B Nov 6 '15 at 10:47
up vote 6 down vote accepted

The problem is copy and paste. With the right quotation marks

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

does the job. I'm not sure from which source I copied the problematic version.

share|improve this answer
1  
A number of blogging and content platforms have misguided "smart" quotes that mess up all kinds of code fragments. – RBerteig Aug 2 '12 at 23:21

Control Panel --> System and Security --> Windows Firewall --> Advanced settings --> right click on Inbound rules --> New rule --> Custom rule -> Next

In Protocol and ports (on the left): Protocol: ICMPv4

On the same panel, press button Customize, choose "Specific ICMP types", check the box "Echo Request", and press button OK.

In Name (on the left): fill in the Name field and press Apply.

share|improve this answer
    
This worked when I tried it. – Peter Mortensen Jul 21 '15 at 11:04

When I typed:

netsh advfirewall firewall add rule name="Enable Echo Ping Request" protocol=icmpv4:8,any dir=in action=allow

into my Windows PowerShell ISE, I got an error: "A specified protocol value is not valid."

I fixed it by using this:

netsh advfirewall firewall add rule name="Enable Echo Ping Request" protocol="icmpv4:8,any" dir=in action=allow
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.