Ping is a network utility used to check whether a device is reachable over a network or not. However, you may not want your Windows server to respond to incoming ping requests and become invisible over the internet.
Blocking ping requests does not make your Windows Server secure by itself, but it can make your server less visible to basic network discovery attempts.
Windows Firewall allows you to control this by creating an inbound rule that blocks ICMP Echo requests (Ping Protocol). In this guide, we’ll show you how to block ping requests on your Windows VPS Server using Windows Defender Firewall.
What Happens When You Block Ping Requests on Windows?
When you block ping requests on Windows, your server stops responding to incoming ICMP Echo Requests sent by other devices. This means that when someone tries to ping your server’s IP address, they typically receive timeout responses instead of a reply.
However, blocking ping requests does not disable the entire ICMP protocol or affect your server’s ability to send outgoing ping requests, as we are going to create an inbound rule for blocking incoming ICMP requests. But other network connections will still work correctly, such as RDP, SSH, and HTTP, unless separate restrictions are applied to them.
How to Block Ping Requests Using Windows Firewall
Windows Defender Firewall allows you to control incoming network traffic by creating custom inbound rules. To block ping requests, you need to create an inbound rule that blocks incoming ICMP Echo Requests. Follow the steps below to configure it.
If you want to learn about blocking ports on Windows Server in detail, you can follow this guide:

The process of port management so that you can manage inbound and outbound data to change, open and close the port is necessary in Windows VPS firewall rules.
Read the full articleOpen Windows Defender Firewall with Advanced Security
First, open Windows Defender Firewall with Advanced Security, where you can manage inbound and outbound firewall rules. You can find it by searching for it in the Start Menu or pressing Win + R to open the Run dialog and typing wf.msc and pressing Enter to open it.

Create Custom Inbound Rule in Windows Firewall
Now, create a new inbound rule to control incoming ping requests. Select Inbound Rules from the left sidebar, right-click Inbound Rules, and select New Rule. In the new inbound rule wizard, select Custom and click Next.

Configure Program Settings
In the Programs section, you need to select a program to specify the inbound rule for; leave on All programs to apply the rule to, then click Next to continue.

Select ICMP Protocol
On the next page, you will need to specify the protocol and ports you want to apply this rule to. Here, select ICMPv4 from the dropdown; this will block IPv4 ping requests. There is another option with the ICMPv6 name; you can also add another rule and block it

Then click on the Customize button to select which ICMP type you want to block.

Select the Echo Request Type
In the ICMP settings, select Specific ICMP types and check only Echo Request. This option handles incoming ping requests, and selecting it allows Windows Firewall to block them.

Note:
The other ICMP types are used for different network functions, such as detecting connection problems, checking network routes, and handling packet delivery. Blocking all these types may interfere with normal network operations and troubleshooting tools. Therefore, if your goal is only to block ping requests, you should leave the other ICMP types unchecked.
Configure IP Address Scope
In the next page you will be asked for the scope you want to apply this rule for you can here specify specific IP address or keep it as it is and click next to apply the rule for all IP addresses.

Set the Firewall Rule Action
On the next page you should select the action you want to do with incomming ICMP connection, here you should select block the connection to drop incomming connections.

Select Network Profiles
On this page, you can select which network profiles the firewall rule should apply to. Windows Firewall has three profiles, each representing a different type of network connection. For this step, it’s best to leave all three profiles checked unless you want the rule to apply only to a specific network profile.

Name the Firewall Rule
In the final step, specify a name and description for your ICMP blocking rule so you can easily identify it later.

How to Block Both IPv4 and IPv6 Ping Requests
Windows Firewall handles IPv4 and IPv6 traffic separately, so blocking IPv4 ping requests does not automatically block IPv6 ping requests. If you want your Windows Server to stop responding to ping requests over both protocols, you need to create two separate inbound rules.
Follow the same steps described above, but create one rule using ICMPv4 and another using ICMPv6. In both rules, select only Echo Request under the ICMP settings and set the action to Block the connection.
Once both rules are enabled, incoming ping requests over IPv4 and IPv6 will be blocked. Your server will still be able to send outgoing ping requests.
How to Test if Ping Requests Are Blocked
After configuring the firewall rules, you can test whether incoming ping requests are blocked by sending a ping request to your VPS from another device.
Whether you are using Windows or Linux on another computer, open a terminal or command prompt and run the following command by replacing Your_VPS_IP with your VPS’s IP address.
ping Your_VPS_IPReply from 8.8.8.8: bytes=32 time=116ms TTL=112
Reply from 8.8.8.8: bytes=32 time=134ms TTL=112
Reply from 8.8.8.8: bytes=32 time=106ms TTL=112
Reply from 8.8.8.8: bytes=32 time=120ms TTL=112Note:
In the example above, we tried pinging 8.8.8.8; you can replace your IP with 8.8.8.8
How to Allow Ping Requests Again
To allow incoming ping requests to your Windows Server again, you need to remove or disable the firewall rules you created earlier to block ICMP traffic.
Open Windows Defender Firewall with Advanced Security, navigate to Inbound Rules, and locate the rules you created for blocking ICMPv4 and ICMPv6 traffic. Right-click each rule and select Disable Rule or Delete.
Once the rules are disabled or removed, your server should respond to incoming ping requests again, provided no other firewall or network rules are blocking ICMP traffic.
You can also follow this guide to learn how to open ports on a Windows server in detail:

Summary
Blocking ICMP requests on a Windows Server does not, by itself, make your Windows VPS significantly more secure. It can only reduce the chances of your server being detected through basic network discovery attempts.
However, if you want to disable incoming ping requests for any other reason, all you need to do is create a new inbound rule in Windows Defender Firewall to block ICMP traffic to your VPS over either IPv4 or IPv6.
Creating an inbound firewall rule to block ICMP traffic does not prevent your server from pinging other servers. It simply stops your server from responding to incoming ICMP requests. If you want to allow ping requests again later, you can disable or remove the firewall rules you created, and your server will respond to incoming pings as before.

