I am trying connect to a cloudflare IP from a AWS server by sending a https request.
It always timeout.
But from other servers, like digitalocean and hetzner, as well as from local, the request works well.
I checked AWS security settings, it seems nothing block the request.
So, does cloudflare block some AWS ips or I missed something??
Those are IPs, not hostnames… what error are you receiving. Cloudflare isn’t blocking a connection to origins. If there’s a specific error/ origin error you should debug it based on the error received.
I am using Https (js) to send out a request.
I changed the “lookup” function so that the DNS can directly give the specific cloudflare IP (103.21.244.6, for a faster speed).
This code works well on local but fails on AWS server.
It simply gives:
problem with request connect ETIMEDOUT 103.21.244.6:443
But you appear to have selected an IP address Cloudflare owns which isn’t even listening on port 443. Use one of the IP addresses assigned to the domain in question if you feel you must hard code it.