= 帮助调查 Ubuntu VPS 上的传入 IP 连接 webhook 问题 =

![ ](httpswww.redditstatic.com/desktop2x/img/renderTimingPixel.png)

我正在调查 Stripe webhooks 未到达我们的测试服务器的一些问题。

根据文档,Stripe 从以下 IP 提交请求:httpsstripe.com/docs/ips#webhook-notifications

我已将这些 IP 添加到 iptables:

Chain INPUT(策略 DROP 84 个数据包,3652 字节)pkts 字节 target prot opt in out source destination 332 101K ACCEPT tcp -- * * 54.187.216.72 0.0.0.0/ACCEPT tcp -- * * 54.187.205.235 0.0.0.0/ACCEPT tcp -- * * 54.187.174.169 0.0.0.0/接受 tcp -- * * 54.88.130.237 0.0.0.0/接受 tcp -- * * 54.88.130.119 0.0.0.0/接受 tcp -- * * 52.15.183.38 0.0.0.0/接受 tcp -- * * 35.154.171.200 0.0.0.0/接受 tcp -- * * 18.211.135.69 0.0.0.0/接受 tcp -- * * 13.235.122.149 0.0.0.0/接受 tcp -- * * 13.235.14.0.237 0.0/接受 tcp -- * * 3.130.192.231 0.0.0.0/接受 tcp -- * * 3.18.12.63 0.0.0.0/0

我不是 iptables 专家,但看起来它似乎只匹配 54.187.216.72。来自 Stripe 的其他请求将因超时错误而失败,我假设这是来自其他 IP。

我可以在我的 Apache 日志中看到唯一可用的 IP。我想我可以排除 ufw / 防火墙问题,因为我在测试期间也尝试过暂时禁用它。

54.187.216.72 - - [04/May/2022:19:59:59 +0000] "POST /stripe/endpoint HTTP/1.1"200 6305"Stripe/1.0 (+httpsstripe.com/docs/webhooks)"我的问题:如何进一步调查此问题?我的 iptables 设置是否正确?这里还有什么可以阻止其他 iptables 和 ufw 的 IP 吗?

Stripe 无法告诉我他们的请求使用了哪个 IP。我的托管服务提供商只是将我引导至 iptables。我也尝试过在没有应用任何 iptables 规则的情况下进行测试。

我希望你们能提供一些见解或为我指明正确的方向。如果您需要更多信息,请告诉我!

谢谢!

更新:

此处的其他主题:httpswww.reddit.com/r/sysadmin/comments/uiuif8/investigating_incoming_ip_connection_issues_on/

== 关于社区 ==

成员

在线