为什么我的程序发送“匿名 IP 数据包”?我该如何阻止呢?

发布于 2024-10-16 01:48:50 字数 279 浏览 2 评论 0原文

因此,我们今天刚刚收到消息,我们的一个客户端防火墙正在阻止我们的 HTTP 请求,因为“[软件] 正在向我们的防火墙(Microsoft TMG 防火墙)发送匿名数据包,因此防火墙会丢弃这些数据包,因为匿名访问[不] 允许。”

对于我们的连接代码,我们使用带有curl 的c++,如果需要,我们会回退到IEDownloadToFile。我没有编写原始代码,也不是真正的网络程序员,所以我来这里寻求帮助。所以,我的问题是:什么是匿名数据包?我在curl中做了什么可能会导致匿名数据包?在哪里可以找到有关解决此问题的更多信息?谢谢!

So, we just got word today that one of our clients firewall is blocking our HTTP requests because "The [software] is sending anonymous packets to our firewall (a Microsoft TMG firewall) so the firewall is dropping the packets as anonymous access is [not] allowed."

For our connection code we are using c++ with curl and we fallback to IEDownloadToFile if needed. I didn't write the original code nor am I really a network programmer so I came here for help. So, my questions are: What are anonymous packets? What am I doing in curl that could cause anonymous packets? Where can I find more information about solving this problem? Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

七七 2024-10-23 01:48:50

他们的意思是您的应用必须通过防火墙进行身份验证。该链接提供了有关 TMG 产品的大量信息。您的客户端可能具有以下配置:

要求用户随时进行身份验证
他们请求网络访问。每个网络
会话需要身份验证。

使用此方法时,请注意
以下:

匿名 Web 访问已禁用。

Forefront TMG 请求用户
凭据并在之前验证它们
它根据以下内容检查请求
防火墙策略。如果用户未能
进行身份验证,他们的访问请求是
被拒绝。

此方法是按网络定义的。
大多数非交互式客户端,例如
Windows Update 客户端无法
进行身份验证,因此被拒绝
访问。

因此,当用户打开 Web 浏览器并尝试访问网页时,他们会收到一个弹出窗口,要求提供凭据,因为防火墙已拦截他们的 Web 请求并发送自己的身份验证页面。当用户进行身份验证时,防火墙会传递 Web 流量。

您的自动化应用程序不会通过防火墙进行身份验证,因此防火墙会丢弃数据包,并且您的流量被分类为 匿名

抱歉,我不知道如何使您的应用程序通过防火墙进行身份验证的解决方案。如果您的应用程序访问特定的 URL,网站运营商可以将它们列入白名单。

根据此页面,您应该得到错误 407:curl 需要代理身份验证。尝试将这些选项添加到curl初始化中,但仍然存在以交互方式询问用户网络凭据的问题:

CURLOPT_HTTPAUTH: add CURLAUTH_NTLM
CURLOPT_PROXYAUTH: add CURLAUTH_NTLM
set CURLOPT_FOLLOWLOCATION

What they mean is your app has to authenticate with the firewall. That link provides a wealth of information concerning the TMG product. Your client probably has this configuration:

Require users to authenticate whenever
they request Web access. Every Web
session requires authentication.

When using this method, note the
following:

Anonymous Web access is disabled.

Forefront TMG requests user
credentials and validates them before
it checks the request against the
Firewall policy. If users fail to
authenticate, their access request is
denied.

This method is defined per network.
Most non-interactive clients, such as,
the Windows Update client, cannot
authenticate, and are therefore denied
access.

So when the user opens their web browser and tries to access a web page, they'll get a pop-up window asking for credentials because the firewall has intercepted their web request and sent its own authentication page. When the user authenticates, the firewall passes web traffic.

Your automated app does not authenticate with the firewall, so the firewall drops packets and your traffic is classified as anonymous.

Sorry, I don't know the solution on how to make your application authenticate with the firewall. If your app goes to specific URLs, the site operators could whitelist them.

According to this page, you should be getting error 407: proxy authentication required from curl. Try adding these options to the curl initialization, but you still have the problem of asking the user for their network credentials interactively:

CURLOPT_HTTPAUTH: add CURLAUTH_NTLM
CURLOPT_PROXYAUTH: add CURLAUTH_NTLM
set CURLOPT_FOLLOWLOCATION
空气里的味道 2024-10-23 01:48:50

标准网络用语中不存在“匿名数据包”这样的东西。您的客户端防火墙正在制定条款,或者在消息到达您之前,线路中的某个地方出现了沟通不畅。无论哪种方式,您都需要从客户或防火墙供应商或文档中获得澄清。

There is no such thing as an 'anonymous packet' in standard networking parlance. Your client's firewall is making up terms, or there was a miscommunication somewhere along the line before the message got to you. Either way, you're going to need to get clarification from your client or the firewall's vendor or documentation.

无戏配角 2024-10-23 01:48:50

我同意bdonlan的观点。在 http 请求的上下文中,“匿名数据包”充其量是模糊且不明确的。也许他们的意思是没有推荐人代码?或者他们需要 http 身份验证?或者您需要先建立会话密钥才能访问您请求的特定 URL?您需要客户提供实际的技术细节。

I agree with bdonlan. In the context of http requests, "anonymous packets" is vague and ambiguous at best. Maybe they mean there is no referrer code? Or they require http-authentication? Or you need to establish a session key before being able to access the specific url you are requesting? You need actual technical details from your client.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文