Windows server 2019 не пингуется


Posted by
on December 21, 2018

By default in Windows Server 2019 the Windows Firewall is configured to drop all inbound ICMP traffic. This includes echo requests which are used by the ping command, which can make network troubleshooting difficult.

In this guide we will cover how to allow ping through Windows Firewall in Windows Server 2019.

A common response is usually to simply disable Windows Firewall entirely, however this is not recommended as the Windows Firewall does a good job at providing a basic level of system protection. We will only be allowing the specific rules required to allow ping to succeed.

Allow ping through Windows Firewall

  1. First we need to open Windows Firewall, this can be done a few ways. My favourite method is to simply hit the Windows key to open start, then start typing firewall. As shown below Windows Firewall with Advanced Security should show, click this.
    Windows Server 2019 Start Menu - Open Windows Firewall

    Alternatively you can simply type ‘firewall’ and press enter in PowerShell to open the basic firewall interface, then click “Advanced settings” on the left hand side – this will open the same interface listed in the start menu.

  2. From the Windows Firewall with Advanced Security window that opens up, select Inbound Rules from the menu on the left.

    Inbound Windows Firewall Rules

  3. From the rules listed under Inbound Rules, select “File and printer Sharing (Echo Request – ICMPv4-In)” and enable the rule.

    Windows Firewall enable inbound ICMP

    Note that this will only allow IPv4 requests in, if you need IPv6 then you will want to enable the “File and Printer Sharing (Echo Request – ICMPv6-In)” rule, listed just below.

  4. Once enabled the server should now respond to ping requests. From my desktop I begun to ping my Windows Server 2019 virtual machine at 192.168.75.133 before enabling the rule, and then again after enabling it. You can see below that the first requests timed out, as inbound ICMP requests were disabled by default in Windows Server 2019. After enabling the ICMP rule, the ping requests succeed, confirming that this is working as expected.

    Command Prompt Ping Example

Summary

By Default Windows Firewall prevents ICMP echo requests, this results in the server not responding to ping. By enabling this firewall rule we have enabled ping in Windows Server 2019, which can help us with network troubleshooting.

This guide will teach us how to enable ping response in Windows 2019/2016 and 2012 R2 servers. Though the original post was written with the screenshots from Windows 2012 R2 server, the same steps apply to any recent Windows servers, including version 2022.

Enabling ping will help you to monitor and troubleshoot network issues on your network. The ping request will work according to your domain environment policies and settings. If it works by default, we will also show you how to disable the ping in Windows servers. We have mentioned the Powershell commands if you want to work on a remote system or Core edition of Windows OS.

Read Also: How to enable ping on Windows 10/11 client PC

1) Go to the control panel and open ‘Windows Firewall’. There are plenty of ways to reach the control panel on a Windows server.

Windows firewall

2) Click on ‘Advanced Settings.’

Firewall advanced settings

Additionally, you can search for ‘Firewall’ in Windows search to reach the advanced Firewall settings as below.

Search For Windows Firewall

3) In the earlier Operating Systems, we need to create a firewall rule to allow ICMP echo packets. Luckily the rule is already there, and we just need to enable it.

To enable the inbound rule allowing ICMP packets, select ‘Inbound Rules.’

Locate the ‘File and Printer Sharing (Echo Request –ICMPv4-In’), right-click on it and select Enable Rule.

Enable Ping on Windows Server

That will allow incoming ping requests and respond to them without completely disabling the Windows firewall service. As we enabled this rule only for IPv4 packets, we need to enable a separate similar rule for ICMPv6-In for the IPv6 network.

The below screenshot shows a Windows server started responding to ping requests once the above rule was enabled.

Ping reply on Windows server

In a similar scenario, if a server is responding to ping/ICMP requests but needs to stop it for tight security, you can simply disable the same rule.

Visit the Windows firewall advances settings and disable the ‘File and Printer Sharing (Echo Request –ICMPv4-In’) rule.

Enable Ping by PowerShell Commands in Windows Servers

Geeks like command lines, especially the Windows OS admins love PowerShell. We can use the below commands to enable/disable ping on Windows Server and Client Operating Systems. Especially if you work on remote systems via PowerShell or have the Server Core OS without GUI.

Make sure to run the below commands ‘as administrator’ on the command prompt or PowerShell.

Enable IPv4  – This will create an exception in the default Windows firewall rule.

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

For IPv6:

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

To disable ping on IPv4:

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

For IPv6:

netsh advfirewall firewall add rule name="ICMP Allow incoming V6 echo request" protocol=icmpv6:8,any dir=in action=block

As ping is a useful utility to troubleshoot and find the presence of a network device, it completely depends on the network security policies of your environment to enable or disable it. We mentioned the easy steps you can do by GUI and command prompt in this guide.

— Advertisement —

Hello, how are you? In this post, we are going to talk a little about PING. Packet Internet Groper, abbreviated as PING, is a diagnostic tool that tests connectivity between two nodes or devices across a network. Additionally, check if a network data packet is capable of being distributed to an address without errors. It also determines the network accessibility of a specific IP address. On the other hand, it is used to determine and ensure that a host computer that a user is trying to reach is actually operating. Its main use is to check for network errors. Due to security policies, it is disabled by default in Windows Server. However, It is a very useful program to measure the quality of the connection. So I’m going to show you how to enable PING in Windows Server 2019.

Edit Windows Firewall

As mentioned earlier, PING is disabled by default. So what we will do is edit the Windows Firewall inbound rules. With this intention, please type defender in the search bar. After the results appear, please enter in Windows Defender Firewall with Advanced Security:

ntering the firewall with advanced security

Entering the firewall with advanced security

Once the Windows Firewall is deployed, please select the inbound rules. Then scroll down to locate File and Printer Sharing (Echo Request – ICMPv4-In).

Inbound rules in Windows Server 2019

Inbound rules in Windows Server 2019

Then, double-click on it to enter the properties. In this section, it is necessary to modify two aspects. First, check the box to Enable the rule. Additionally, modify the action to Allow connections. Then, press Apply and OK to set the rule.

Modifying the inbound rule to enable PING

Modifying the inbound rule to enable PING

Back to the previous screen, you can see the rule with a check sign. This means that it is enabled correctly.

Inbound rule modified successfully.

Inbound rule modified successfully.

Testing PING

Once the previous modifications have been made, it is time to try PING. With this intention, please open a command prompt. Next, test the connection with an IP address or domain name. In this case, we will use www.osradar.com. Please enter the following command and press enter:

ping www.osradar.com

Pinging to the domain www.osradar.com

Pinging to the domain www.osradar.com

Conclusion

Finally, we have seen how to enable PING in Windows Server 2019. It is a popular diagnostic utility in the computer network environment. In addition, it is widely used to measure latency. This is all for now before I say goodbye I invite you to review our post on EasyPHP in Windows 10.

ICMP or Ping is disabled by default on Windows Server and Windows 11 / Windows 10. Keeping Ping disabled makes the system safer, but troubleshooting becomes more difficult.

As ping indicates that the remote computer is connected to the network and capable of communicating, it is a useful command, especially for sysadmins.

As a sysadmin myself, I have to install Windows Server and client frequently. Since our network is secured by hardware firewalls, it’s safe to allow ping on Windows Server and Windows client computers.

How ping works

How ping works

I prefer to enable Ping manually and not use Group Policy. In this article, we will go through the step-by-step process of enabling Ping through Windows Firewall.

If ping is not enabled on your computer, you will get a request timed out message when you ping the computer.

ping server

ping server

How to enable Ping in Windows Firewall

To enable ping on Firewall, follow the steps below:

  1. Open Firewall by going to Run –> firewall.cpl

  2. Click on Advanced Settings from the right-hand pane

    Firewall advanced settings

    Firewall advanced settings
  3. Right-click on Inbound Rules on the left-hand pane and select New Rule

    New inbound rule in Firewall

    New inbound rule in Firewall
  4. Select File and Printer Sharing under Predefined. Click on Next.

  5. Select the following two rules:

    • File and Printer Sharing (Echo Request – ICMPv6-In)
    • File and Printer Sharing (Echo Request – ICMPv4-In)

    Enable ICMP rules from Group Policy

    Enable ICMP rules from Group Policy

    Click on Next.

  6. Make sure “Allow the connection” is selected. Click on Finish.

    Allow the connection rule for ping

    Allow the connection rule for ping

How to enable Ping using Command Line

To enable Ping using Command Line, open Command Prompt or PowerShell and run the following commands:

Allow IPv4 ping using cmd:

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

Allow IPv4 ping using PowerShell:

New-NetFirewallRule -DisplayName "ICMP Allow Ping V4" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress <localsubnet> -Action Allow

Allow IPv6 ping using cmd:

netsh advfirewall firewall add rule name="ICMP Allow Ping V6" protocol="icmpv6:8,any" dir=in action=allow

Allow IPv6 ping using PowerShell:

New-NetFirewallRule -DisplayName "ICMP Allow Ping V6" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress <localsubnet> -Action Allow

To disable Ping using Command Line, open Command Prompt or PowerShell and run the following commands:

Block IPv4 ping using cmd:

netsh advfirewall firewall add rule name="ICMP Allow Ping V4" protocol=icmpv4:8,any dir=in action=block

Block IPv4 ping using PowerShell:

New-NetFirewallRule -DisplayName "ICMP Allow Ping V6" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress <localsubnet> -Action Block

Block IPv6 ping using cmd:

netsh advfirewall firewall add rule name="ICMP Allow Ping V6" protocol="icmpv6:8,any" dir=in action=block

Block IPv6 ping using PowerShell:

New-NetFirewallRule -DisplayName "ICMP Allow Ping V6" -Direction Inbound -Protocol ICMPv4 -IcmpType 8 -RemoteAddress <localsubnet> -Action Block

How to enable Ping through Firewall using Group Policy

Sometimes it becomes cumbersome to go through each computer in the network and enable ping. A rather easier way would be to disable Windows Firewall by default. This could be a security rick. Alternatively, we can enable ping for all computers (or a set of computers) in the network using the Group Policy.

Here’s how to enable ping using Group Policy:

  1. Open the Group Policy Management Console on your Domain Controller from Server Manager –> Tools –> Group Policy Management.

  2. You can either create a new Group Policy Object and apply it to relevant computers or edit the already existing universal GPO.

    Edit Default Domain Policy

    Edit Default Domain Policy
  3. Navigate to the following:

    Computer Configuration -> Policies -> Windows Settings -> Security Settings -> Windows Defender Firewall with Advanced Security -> Windows Defender Firewall with Advanced Security -> Inbound Rules
  4. Right-click Inbound Rules and create a New Rule.

    New inbound rule

    New inbound rule
  5. Select File and Printer Sharing under Predefined. Click on Next.

  6. Select the following two rules:

    • File and Printer Sharing (Echo Request – ICMPv6-In)
    • File and Printer Sharing (Echo Request – ICMPv4-In)

    Enable ICMP rules from Group Policy

    Enable ICMP rules from Group Policy

    Click on Next.

  7. Make sure “Allow the connection” is selected. Click on Finish.

    Allow the connection rule for ping

    Allow the connection rule for ping

That’s it. Now ping is enabled across the internal network. If any computer still does not allow ping traffic, please run the following command on that computer:

gpupdate /force

Ping enabled on the server

Ping enabled on the server


  • Vander Host are specialists in domain name registration, website and VPS hosting.




  • Operating Systems

TL;DR Guide

  1. Search
  2. Windows Defender Firewall with Advanced Security
  3. Inbound Rules
  4. Scroll, scroll, scroll
  5. File and Printer Sharing (Echo Request – ICMPv4-In)
  6. Click click
  7. Enabled
  8. Done
  9. Yay

See Also

https://kb.vander.host/operating-systems/cannot-ping-freshly-installed-windows-2012-server/

Reference

How To Enable Ping In Windows Server 2019 Firewall

Tags





  • firewall, icmp-ping, ping, windows-2019, windows-defender




  • Created:
    23 March 2021



  • Updated:

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Comment *

Name*

Email*

Website

Save my name, email, and website in this browser for the next time I comment.

PrevPreviousPost Server Migration, All Mac IMAP Folders Missing

NextHow to enable Remote Desktop Protocol for Administration Purposes on Newly Created Windows 2019 ServerNext

  • Windows server 2019 не видит компьютеры в сети
  • Windows server 2019 настройки языка
  • Windows server 2019 настройка терминального сервера без домена
  • Windows server 2019 настройка сервера времени
  • Windows server 2019 настройка обновлений