Lagless.gg Docs

Enable ICMP (Ping) on Windows Server

How to enable ICMP echo requests on Windows Server using PowerShell and Command Prompt via Windows Firewall rules.

By default, Windows Server blocks ICMP echo requests (ping) on the Public network profile through Windows Defender Firewall. This guide shows you how to enable ICMP using either PowerShell or Command Prompt.

Enabling ICMP on a public-facing interface may expose your server to network reconnaissance. Consider enabling it only on Domain or Private profiles if your server is internet-facing.

Prerequisites

  • Administrator privileges on the Windows Server instance
  • Access to PowerShell or Command Prompt (run as Administrator)

Enable ICMP

Open PowerShell as Administrator

Right-click the Start menu and select Windows PowerShell (Admin) or Terminal (Admin).

Enable ICMPv4 (Ping) inbound

Run the following command to create a firewall rule that allows inbound ICMPv4 echo requests:

New-NetFirewallRule `
  -Name "Allow-ICMPv4-In" `
  -DisplayName "Allow ICMPv4 Inbound" `
  -Protocol ICMPv4 `
  -IcmpType 8 `
  -Direction Inbound `
  -Action Allow `
  -Profile Any `
  -Enabled True

(Optional) Enable ICMPv6

If your environment uses IPv6, also run:

New-NetFirewallRule `
  -Name "Allow-ICMPv6-In" `
  -DisplayName "Allow ICMPv6 Inbound" `
  -Protocol ICMPv6 `
  -IcmpType 128 `
  -Direction Inbound `
  -Action Allow `
  -Profile Any `
  -Enabled True

Verify the rule was created

Get-NetFirewallRule -Name "Allow-ICMPv4-In" | Select-Object Name, DisplayName, Enabled, Direction, Action

You should see Enabled : True in the output.

To scope the rule to a specific network profile, replace -Profile Any with -Profile Domain, -Profile Private, or -Profile Public.


Reverting the Change

To remove the ICMP rules and restore the default blocked state:

Remove-NetFirewallRule -Name "Allow-ICMPv4-In"
Remove-NetFirewallRule -Name "Allow-ICMPv6-In"

Testing Connectivity

Once the rules are applied, test from another machine on the network:

ping <your-server-ip>

A successful response confirms ICMP is now enabled.

Ready to get started?

Launch your server today

Get Your Server