I'm investigation some issues with Stripe webhooks not reaching our test server.
According to their docs they submit requests from the following IPs: https://stripe.com/docs/ips#webhook-notifications
I have added these IPs to the iptables:
Chain INPUT (policy DROP 84 packets, 3652 bytes)
pkts bytes target prot opt in out source destination
332 101K ACCEPT tcp -- * * 54.187.216.72 0.0.0.0/0
0 0 ACCEPT tcp -- * * 54.187.205.235 0.0.0.0/0
0 0 ACCEPT tcp -- * * 54.187.174.169 0.0.0.0/0
0 0 ACCEPT tcp -- * * 54.88.130.237 0.0.0.0/0
0 0 ACCEPT tcp -- * * 54.88.130.119 0.0.0.0/0
0 0 ACCEPT tcp -- * * 52.15.183.38 0.0.0.0/0
0 0 ACCEPT tcp -- * * 35.154.171.200 0.0.0.0/0
0 0 ACCEPT tcp -- * * 18.211.135.69 0.0.0.0/0
0 0 ACCEPT tcp -- * * 13.235.122.149 0.0.0.0/0
0 0 ACCEPT tcp -- * * 13.235.14.237 0.0.0.0/0
0 0 ACCEPT tcp -- * * 3.130.192.231 0.0.0.0/0
0 0 ACCEPT tcp -- * * 3.18.12.63 0.0.0.0/0
I'm not an iptables expert, but looking at this it seems that it's only matching 54.187.216.72. Other requests from Stripe will fail with a timeout error, which I'm assuming are coming from other IPs.
I can see the only working IP in my apache logs. I think I can rule out ufw / firewall issues because I have tried to temporary disable that as well during testing.
54.187.216.72 - - [04/May/2022:19:59:59 +0000] "POST /stripe/endpoint HTTP/1.1" 200 6305 "-" "Stripe/1.0 (+https://stripe.com/docs/webhooks)"
My question: How do I investigate this issue further? Is my iptables setup correct? Is there anything else here that could block IPs other iptables and ufw?
Stripe could not tell me which IP was used on their requests.
I hope I'm providing the correct information here, if not please let me know!
Thanks a lot!