I have deployed my ASP.NET application on Windows Server 2008 R2. Now, I want to block all ping requests to this server without affecting the operation of my ASP.NET application.
-
1Why do you want to block ping?– Shane MaddenApr 21, 2012 at 17:22
-
@ShaneMadden: want ping request disable ie(ping from cmd gives no response)– Satinder singhApr 21, 2012 at 17:26
-
2But why? What threat do yo believe you are protecting from?– ZoredacheApr 21, 2012 at 20:19
Add a comment
|
2 Answers
Try running:
netsh firewall set icmpsetting 8 disable
-
The
netsh firewall
context is deprecated in Windows 2008 R2. However, the alternative that the warning message recommends isnetsh advfirewall firewall
, andnetsh advfirewall firewall set icmpsetting 8 disable
does not work, it says that the command was not found. Apparently the new approach is to just make a rule and treat ICMP as just another protocol: support.microsoft.com/kb/947709– JamesCWMay 29, 2012 at 19:35
Here's the solution
Go to Start >> Administrative Tools >> Windows Firewall with Advanced Security >> Inbound Rules >> File and Printer Sharing (Echo Request – ICMPv4-IN) >> right click and select Enable Rule.
well now my application works fine and from cmd if you try to send ping request to my server u will not recieve any response. This is what i need :)