Automation using Group Policy – Allow Ping on Windows Server 2025

Let’s be honest: There is nothing more frustrating than deploying a fresh Windows Server 2025 instance, trying to ping it to verify connectivity, and getting a “Request Timed Out.” We want to Allow Ping (ICMP) on Windows Server 2025!

The Story to Allow Ping on Windows Server 2025

In the past, many (hopefully not you) administrators would simply disable the Windows Firewall entirely to “fix” this. That was the “traditional” quick fix. It worked, but it was reckless. Others would manually enable the rule on every single server. That’s not scalable.

Today, we need a modern, automated, and secure approach. We need observability for our monitoring systems, but we cannot afford to leave our network wide open. Here is how to configure a Group Policy Object (GPO) to allow ICMP Echo (Ping) on Windows Server 2025, and more importantly, how to do it securely.

I want a single GPO that applies to all our Windows Server 2025 machines (or a specific subset) that allows them to reply to Ping requests.

If you haven’t used Group Policy Objects (GPOs) that much, please start reading my initial blog posts “Group Policies and Group Policies Preferences” and “Automation using Group Policy – Background” to understand the foundation.

Configure the Windows Firewall – Group Policy Management Console (GPMC)

The easy way for your homelab to Allow Ping on Windows Server 2025

Create the GPO: Create a new GPO named SEC_Server_AllowPing (or a naming convention that actually makes sense in your environment) and link it to your Server OU. If we use the naming convention explained here, it would be something like this:

LAB-Computer-Security-WindowsFirewallAllowICMP-Server

Edit the GPO: Navigate to the following path: Computer Configuration > Policies > Windows Settings > Security Settings > Windows Defender Firewall with Advanced Security > Windows Defender Firewall with Advanced Security – LDAP… > Inbound Rules

New Rule: Right-click Inbound Rules and select New Rule.

Rule Type: Select Predefined and choose File and Printer Sharing from the dropdown. Click Next.

Select the Rule: You will see a list of rules. You do not need all of them. Uncheck everything except:

  • File and Printer Sharing (Echo Request – ICMPv4-In)
  • (Optional: Select ICMPv6-In if you are actually using IPv6, which you should be).

Action: Select Allow the connection.

GPO Create Allow Ping (ICMP) on Windows Server 2025
GPO Create Windows Firewall to allow ICMP

The modern way – “Zero Trust”

If you want to do Allow Ping on Windows Server 2025 in a better and more secure way, you need to restrict who can actually ping your server. In a Zero Trust world, your servers shouldn’t be responding to pings from a random workstation or IP Range.

Let’s configure a Subnet Range to allow Admin Jump Hosts. For me this is the subnet 192.168.0.0/24.

  1. Navigate to the following path: Computer Configuration > Policies > Windows Settings > Security Settings > Windows Defender Firewall with Advanced Security > Windows Defender Firewall with Advanced Security – LDAP… > Inbound Rules
  2. After creating the rule, double-click it in the GPO editor to open Properties.
  3. Go to the Scope tab.
  4. Under Remote IP address, change “Any IP address” to These IP addresses.
  5. Add only the subnets or specific IPs of your:
    • Management Network (Admin Jump Hosts)
    • Monitoring System (Nagios, PRTG, Zabbix, etc.)

This values the utility of the “ping” (a tool from the past that is still vital) but applies the modern security posture required for 2025.

GPO Limit Allow ICMP to an IP Range
GPO Limit Allow ICMP to an IP Range

One command like this or some patience

gpupdate /force

and your firewall now allows this very specific traffic. Based on this configuration and the OU assignment to all Windows Servers in my homelab AD, this is now true for all servers that I install and move to the standard OUs.

You can also run the following powershell command to verify the setting to Allow Ping on Windows Server 2025.

Get-NetFirewallRule -DisplayName "File and Printer Sharing (Echo Request - ICMPv4-In)" | Select-Object Name, Enabled, Profile, Direction, Action
image
Check Firewall setting using Powershell

It’s also fixed for my simple “ping” based monitorin in Uptime Kuma.

image
Ping works on Uptime Kuma

Conclusion

Enabling Ping via GPO is a basic task that will now take you like 10 minutes including reading this guide. Doing it with this security scoping is what separates a legacy and unsecure environment from a more modern configuration.

We also used this simple level of automation to “magically” let our GPO fix this for all existing and future servers.

Important: Keep your firewall on, allow only what is necessary, and define your scope.

If you have any questions please don’t hesitate to reach out to me on LinkedIn, Bluesky or check my newly created Adaptive Cloud community on Reddit.

LinkedIn: https://www.linkedin.com/in/andreas-hartig/
Bluesky: https://bsky.app/profile/hartiga.de
Adaptive Cloud community on Reddit: https://www.reddit.com/r/AdaptiveCloud/

Avatar for Andreas Hartig
Andreas Hartig - MVP - Cloud and Datacenter Management, Microsoft Azure

Related Posts

the IT Operations dragon looking at multiple screens with Group Policies on them and the GPO Policy Analyzer checking them all

How to use the GPO Policy Analyzer

Managing Group Policy Objects across a complex Active Directory environment has always been a challenge. Administrators often inherit hundreds of GPOs with overlapping configurations, stale settings, and hidden conflicts. Finding…

Read more
WAU Happy Dragons crazy about 110 percent security

Schedule Winget Auto Updates for operational usage

Deploying Winget Auto Updates (WAU) gives you a functional update baseline, for full functionality we need to configure more to get ready for production. If servers query the Winget repository…

Read more
WAU Happy Dragons about improved security

Centralized Software Patch Management: Deploying Winget Auto Updates (WAU) via Active Directory GPO

Deploying Winget Auto Updates for Software Patch Management for managing third-party software updates across an IT infrastructure typically requires expensive enterprise solutions. This article provides a technical guide on how…

Read more
Stay Hydrated Drink enoughv2

GPO Central Store – Help! My PolicyDefinitions Folder is missing

Your PolicyDefinitions Folder is missing? The GPO Central Store is key for Managing Group Policy Objects (GPOs) across multiple domain controllers can introduce configuration drift if administrative templates are not…

Read more
A single control plane for LAPS using AzureArc

Legacy LAPS vs. Windows LAPS vs. LAPS for Azure Arc

LAPS for Azure Arc is the new shining star, after for years, IT teams relied on the classic, legacy Microsoft LAPS tool. Microsoft then integrated Windows LAPS directly into the…

Read more
Dragons looking at AccountLockout Tool

AD Account Lockout (Free Tool)

The AD Account Lockout tool is free and very valuable in troubleshooting account lockouts in Active Directory. This is a task as old as the directory service itself. Even in…

Read more