• 关闭防火墙ping请求超时When Windows Firewall is enabled with default settings, you can’t use the ping command from another device to see if your PC is ... 当使用默认设置启用Windows防火墙后,您将无...


    When Windows Firewall is enabled with default settings, you can’t use the ping command from another device to see if your PC is alive. Here’s how to change that.

    当使用默认设置启用Windows防火墙后,您将无法使用其他设备上的ping命令来查看您的PC是否处于活动状态。 更改方法如下。

    The ping command works by sending special packets known as Internet Control Message Protocol (ICMP) Echo Requests to a target device, and then waiting for that device to send back an ICMP Echo Reply packet. This not only lets you test whether a network-connected device is active, but it also measures the response time and displays that for you, as well. By default, Windows Firewall with Advanced Security blocks ICMP Echo Requests from the network. Sure, you could take the drastic step of disabling the firewall for testing purposes, but a simpler solution is just to create an exception that allows ICMP requests through the firewall. We’re going to show you how to do that both from the Command Prompt and the Windows Firewall with Advanced Security interface. (Note that, if you have an antivirus with a firewall or another type of third-party firewall program installed, you’ll need to open ports in that firewall instead of the built-in Windows Firewall.)

    ping命令通过向目标设备发送称为Internet控制消息协议(ICMP)回显请求的特殊数据包,然后等待该设备发回ICMP Echo Reply数据包来工作。 这不仅使您能够测试联网设备是否处于活动状态,而且还可以测量响应时间并为您显示响应时间。 默认情况下, 具有高级安全性的Windows防火墙会阻止来自网络的ICMP回显请求。 当然,您可以采取激进的步骤来禁用防火墙以进行测试 ,但是更简单的解决方案是创建一个允许ICMP请求通过防火墙的异常。 我们将向您展示如何从命令提示符和具有高级安全性的Windows防火墙界面执行此操作。 (请注意,如果您的防病毒软件安装了防火墙或其他类型的第三方防火墙程序,则需要在该防火墙中打开端口,而不是内置Windows防火墙。)

    The instructions in this article should work for Windows 7, 8, and 10. We’ll point out where there are any major differences.

    本文中的说明应适用于Windows 7、8和10。我们将指出存在主要差异的地方。

    Warning: Creating exceptions and opening ports through your firewall does open up security risks. Allowing ping requests isn’t too big a deal, but it’s usually best to block anything you don’t need.

    警告 :创建例外并通过防火墙打开端口会增加安全风险。 允许ping请求没什么大不了的,但是通常最好阻止不需要的任何东西。

    使用命令提示符允许ping请求 (Allow Ping Requests by Using the Command Prompt)

    The fastest way to create an exception for ping requests is with the Command Prompt. You’ll need to open it with admin privileges. To do so in Windows 8 and 10, press Windows+X and then select “Command Prompt (Admin).” In Windows 7, hit Start and type “command prompt.” Right-click the resulting entry and choose “Run as Administrator.”

    创建ping请求异常的最快方法是使用命令提示符。 您需要使用管理员权限打开它。 为此,请在Windows 8和10中按Windows + X,然后选择“命令提示符(管理员)”。 在Windows 7中,点击“开始”,然后键入“命令提示符”。 右键单击结果条目,然后选择“以管理员身份运行”。

    To enable ping requests, you’re going to create two exceptions to allow traffic through the firewall—one for ICMPv4 requests and one for ICMPv6 requests. To create the ICMPv4 exception, type (or copy and paste) the following command at the prompt and then hit Enter:

    要启用ping请求,您将创建两个例外以允许通过防火墙的流量-一个例外用于ICMPv4请求,另一个例外用于ICMPv6请求。 要创建ICMPv4异常,请在提示符下键入(或复制并粘贴)以下命令,然后按Enter键:

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

    And to create the ICMPv6 exception, use this command:


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

    The changes will take place immediately—no need to restart your PC or anything. Now, if you ping your PC from a remote device, you should get an actual result.

    更改将立即进行-无需重新启动PC或任何其他操作。 现在,如果您从远程设备ping PC,您应该会得到实际的结果。

    To disable ping requests again, you’ll need to disable both exceptions you created. For the ICMPv4 exception, type (or copy and paste) this command at the prompt and hit Enter:

    要再次禁用ping请求,您需要禁用创建的两个异常。 对于ICMPv4异常,请在提示符下键入(或复制并粘贴)此命令,然后按Enter:

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

    And to disable ICMPv6 requests, use this command:


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

    When requests are blocked, ping requests to your PC will be met with a “Request timed out” error.


    Note that when using the commands we just covered, you can use any name for the rule you want. However, when you go to disable a rule, you’ll want to use the same rule name as when you created it. If you forget the name of the rule, you can use the Command Prompt to see a list of all rules. Just type the following command and hit Enter:

    请注意,在使用我们刚刚介绍的命令时,您可以为所需的规则使用任何名称。 但是,当您禁用规则时,您将要使用与创建规则时相同的规则名称。 如果忘记了规则名称,则可以使用命令提示符查看所有规则的列表。 只需键入以下命令,然后按Enter:

    netsh advfirewall firewall show rule name=all

    You’ll see lots of rules listed, but scroll back up to the top of the list and you should see any rules you’ve created right at the top.


    通过使用具有高级安全性的Windows防火墙来允许Ping请求 (Allow Ping Requests by Using Windows Firewall With Advanced Security)

    While the Command Prompt is the quickest way to add an exception to your firewall for ping requests, you can also do this in the graphic interface using the “Windows Firewall with Advanced Security” app. Hit Start, type “windows firewall with,” and then launch “Windows Firewall with Advanced Security.”

    虽然命令提示符是向防火墙添加ping请求例外的最快方法,但是您也可以使用“具有高级安全性的Windows防火墙”应用程序在图形界面中执行此操作。 单击开始,键入“ Windows防火墙使用”,然后启动“具有高级安全性的Windows防火墙”。

    You’re going to create two new rules—one for allowing ICMPv4 requests and one for allowing ICMPv6 requests. In the left pane, right-click “Inbound Rules” and choose “New Rule.”

    您将创建两个新规则-一个用于允许ICMPv4请求的规则,另一个用于允许ICMPv6请求的规则。 在左窗格中,右键单击“入站规则”,然后选择“新规则”。

    In the “New Inbound Rule Wizard” window, select “Custom” and then click “Next.”


    On the next page, make sure “All programs” is selected and then click “Next.”


    On the next page, choose “ICMPv4” from the “Protocol type” dropdown and then click the “Customize” button.

    在下一页上,从“协议类型”下拉列表中选择“ ICMPv4”,然后单击“自定义”按钮。

    In the “Customize ICMP Settings” window, select the “Specific ICMP types” option. In the list of ICMP types, enable “Echo Request” and then click “OK.”

    在“自定义ICMP设置”窗口中,选择“特定ICMP类型”选项。 在ICMP类型列表中,启用“回显请求”,然后单击“确定”。

    Back in the “New Inbound Rule Wizard” window, you’re ready to click “Next.”


    On the next page, it’s easiest to just make sure that the “Any IP address” options are selected for both local and remote IP addresses. If you want, you can configure specific IP addresses to which your PC will respond to a ping request. Other ping requests are ignored. This lets you narrow things down a bit so that only certain devices will be able to ping your PC. You can also configure separate lists of approved IP addresses for your local and remote (Internet) networks. However you set it up, click “Next” when you’re done.

    在下一页上,最简单的方法是确保为本地和远程IP地址都选择了“任何IP地址”选项。 如果需要,您可以配置PC响应ping请求的特定IP地址。 其他ping请求将被忽略。 这使您可以缩小范围,以便仅某些设备能够ping您的PC。 您也可以为本地和远程(Internet)网络配置单独的认可IP地址列表。 但是,设置完成后,请单击“下一步”。

    On the next page, make sure that the “Allow the connection” option is enabled and then click “Next.”


    The next page allows you some control over when the rule is active. If you want the rule to apply no matter what type of network it’s connected to, leave the options at their default and just click “Next.” However, if your PC is not part of a business (and doesn’t connect to a domain), or if you prefer it not respond to ping requests when it’s connected to a public network, feel free to disable those options.

    下一页允许您控制何时激活规则。 如果您希望该规则无论连接到哪种类型的网络都适用,请将这些选项保留为默认值,然后单击“下一步”。 但是,如果您的PC不属于企业(并且未连接到域),或者如果您希望PC在连接到公共网络时不响应ping请求,请随时禁用这些选项。

    Finally, you need to give your new rule a name, and optionally a description. However, we do recommend that you at least get the text “ICMPv4” in there because you’ll also be creating a second rule for allowing ICMPv6 requests. Choose whatever makes sense to you and then click “Finish.”

    最后,您需要给新规则起一个名字,以及一个可选的描述。 但是,我们建议您至少在其中输入文本“ ICMPv4”,因为您还将创建第二条规则来允许ICMPv6请求。 选择对您有意义的任何内容,然后单击“完成”。

    Unfortunately, you’re not quite done yet. It’s a good idea to go ahead and create a second rule that allows incoming ICMPv6 requests. Mostly, it’s a good just-in-case measure. People tend to use IPv4 addresses when issuing ping commands, but some networking apps use IPv6. Might as well have your bases covered.

    不幸的是,您还没有完成。 继续创建允许传入ICMPv6请求的第二条规则是一个好主意。 通常,这是一个很好的案例。 人们在发出ping命令时倾向于使用IPv4地址,但是某些网络应用程序使用IPv6。 可能还包括您的基地。

    Follow the same steps we just went over and set all the options exactly the same as we did for the ICMPv4 rule. However, when you get to the ports and protocols page, select “ICMPv6” from the dropdown instead of “ICMPv4.” That—and creating a different name for the rule—are the only two things that change.

    遵循我们刚刚经过的相同步骤,并将所有选项设置为与对ICMPv4规则完全相同的设置。 但是,当您进入端口和协议页面时,请从下拉列表中选择“ ICMPv6”,而不是“ ICMPv4”。 唯一的两件事就是更改,并为规则创建一个不同的名称。

    When you have the two new rules in place, you can close the “Windows Firewall with Advanced Security” app. No need to restart your PC or anything. Your PC should immediately begin responding to pings.

    有了两个新规则后,您可以关闭“具有高级安全性的Windows防火墙”应用程序。 无需重启PC或其他任何操作。 您的PC应该立即开始响应ping。

    If you ever want to disable all this, you could go back and delete those two rules. However, you might be better off just disabling the rules instead. That way, you can re-enable them without recreating them. In the “Windows Firewall with Advanced Security” app, select “Inbound Rules” on the left, and locate the rules you made in the middle pane. Right-click a rule and choose “Disable” to prevent ping requests from passing through the firewall.

    如果您想禁用所有这些功能,则可以返回并删除这两个规则。 但是,最好禁用这些规则。 这样,您可以重新启用它们而无需重新创建它们。 在“具有高级安全性的Windows防火墙”应用中,选择左侧的“入站规则”,然后在中间窗格中找到您制定的规则。 右键单击规则,然后选择“禁用”,以防止ping请求通过防火墙。

    Allowing ping requests to reach your PC is not something everyone will need to do. But, if you’re doing any kind of network troubleshooting, ping can be a valuable tool. It’s also pretty easy to turn on and off once you have things set up.

    每个人都不需要允许ping请求到达您的PC。 但是,如果您要进行任何类型的网络故障排除,则ping可能是一个有价值的工具。 设置完所有东西后,打开和关闭它也很容易。

    翻译自: https://www.howtogeek.com/howto/windows-vista/allow-pings-icmp-echo-request-through-your-windows-vista-firewall/


  • 1 左下角搜索栏中输入“高级安全 Windows Defender 防火墙” 2.分别在“入站规则”和“出站规则”里面选择“文件和打印机共享(回显请求-ICMPv4-in)”,和“文件和打印机共享(回显请求-ICMPv4-out)”右键属性,在...

    1 左下角搜索栏中输入“高级安全 Windows Defender 防火墙”


  • windows防火墙-Ping禁用与启用 背景与目的 Ping测试常被用于测试网络中两台主机之间是否互相连通,但是,大多数Windows操作系统(包括桌面版和服务器版)默认都是只允许ping其他主机而不允许其他主机ping自己。下面...
  • 2019独角兽企业重金招聘Python工程师标准>>> ...


    开启:netsh firewall set icmpsetting 8

    关闭: netsh firewall set icmpsetting 8 disable


  • Windows防火墙开启ping,禁ping的配置方法 当我通过本机Ping另一台在同一局域网内(即在同一网段)的计算机时,发现,如果防火墙开启的话,无论如何也ping不通。一旦关闭防火墙就可以ping通了。这是为什么呢?究竟该...
  • Windows防火墙开启PING

    千次阅读 2017-08-27 22:03:28
    在做hadoop虚拟机安装的时候出现了windows主机可以ping通虚拟机,但是centos无法ping通window主机1。查看centos的ip 2.通过window主机ping centos虚拟机 以上是windows主机可以ping通虚拟机,下面出现虚拟机无法...


    2.通过window主机ping centos虚拟机


    5。在虚拟机上ping window主机,显示数据包全部丢失


     1. 关闭防火墙可以ping可以通过。


     2. 是要在网络和共享中心--> Windows防火墙-->启用和关闭防火墙-->例外的列表中,打开[文件和打印机共享]
    然后在 管理工具高级 --> 安全Windows防火墙 --> 高级设置 --> 入站规则 --> 在列表里找到“文件和打印机共享(回显请求 - ICMPv4-In)” --> 右击选择启用规则,并在其属性里设置为‘允许连接’。



  • Windows防火墙开启ping

    万次阅读 2012-07-30 15:17:13
    今天被这么一个问题困扰:当... 原因是这样的,现在的计算机系统,出于安全考虑,在默认情况下是不允许外部主机对其进行ping测试的。但在一个安全的局域网环境中,Ping测试又是管理员进行网络测试所必须的。如何更改设
  • Windows防火墙开启ping,禁ping的配置

    千次阅读 2016-12-27 15:17:46
  • 摘抄自: ...Windows XP,Windows Server 2003: Windows防火墙 --> 高级 --> ICMP --> 设置 --> 把“允许传入回显请求”前打上勾 --> 确定 --> 大功告成。 Windows 7,Win 200...
  • 设置windows Server防火墙允许PING

    千次阅读 2020-03-02 16:42:00
    搜索“防火墙”,打开“高级安全 Windows 防火墙”; 选中“入站规则”,找到使用”ICMPv4″的入站规则: 图 1 找到ICMPv4入站规则 选中右键,点击“属性”: 图2打开入站规则的属性设置 默认操作是“允许连接”,...
  • Ping测试常被用于测试网络中两台主机之间是否互相连通,但是,大多数Windows操作系统(包括桌面版和服务器版)默认都是只允许ping其他主机而不允许其他主机ping自己。下面演示如何在Windows系统上开启基于ICMPv4协议...
  • win7设置防火墙允许Ping与telnet

    千次阅读 2015-10-27 18:36:59
    win7比较麻烦,防火墙把什么都挡了 Win 7为了安全,防火默认是不能Ping和telnet的,但我们在局域网里,很多时候管理员方便维护都需把这二个给打开。 PingPing (Pack Internet Groper) 用于测试网络连接是否...
  • 出于安全因素考虑,在Windows 2008 R2上是不允许从外部对其Ping指令,如果需要配置允许Ping,必须通过“高级安全Windows防火墙”进行配置。 2)设备 一台Windwos 2003机器,一台Windows 2008 R2机器(这里用虚拟机...
  • 如果要配置允许Ping 通过以往的设置步骤会发现并不能从 Windows firewall 里找到 ICMP 的相关配置项,而该规则的操作现在必须通过“高级安全 Windows 防火墙” 进行配置。步骤如下: 打开管理工具中的“高级安全...
  • Windows防火墙开启后 ping不通了

    千次阅读 2018-09-12 09:19:57
    Windows防火墙 --> 高级设置 --> 入站规则 --> 找到“文件和打印机共享(回显请求 - ICMPv4-In)” --> 已启用-->允许连接--> 确定
  • WINDOWS系统由于安全考虑,当开启防火墙时,默认不允许外主机对其进行ping功能,即别的电脑ping不通本机。别的主机ping不通本机是因为本机的防火墙关闭了ICMP回显功能,只要把这回显功能打开就行了。 具体做法: ...
  • 背景与目的Ping测试常被用于测试网络中两台主机之间是否互相连通,但是,大多数Windows操作系统(包括桌面版和服务器版)默认都是只允许ping其他主机而不允许其他主机ping自己。下面演示如何在Windows系统上开启基于...
  •  控制面板---防火墙---高级---ICMP设置---勾选“允许传入回显请求”    Win NT 6 系列(Vista、Win 2008、Win 7、Win 8、Win 2012)  cmd--输入wf 按回车--在左侧导航窗体中定位到“入站规则”--找到配置文件...



1 2 3 4 5 ... 20
收藏数 17,121
精华内容 6,848