Curl ips-v4 empty

I run a script to curl the url curl to grab the Cloudflare IPs and configure the firewall to only allow http access from these addresses.

This script has been working for ~year, but stopped in the past ~week.

The very strange thing is that even though curl has stopped working, a wget from the same host is still able to pull the IPs.

[[email protected] ~]# curl
[[email protected] ~]# wget -O /dev/stdout
--2022-02-23 18:45:05--
Resolving (,, 2606:4700::6810:7c60, ...
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 230 [text/plain]
Saving to: ‘/dev/stdout’

/dev/stdout                                                   0%[                                                                                                                                          ]       0  --.-KB/s     
/dev/stdout                                                 100%[=========================================================================================================================================>]     230  --.-KB/s    in 0s

So everything, DNS, routing, etc is working. Strange that curl has broken though.


It works, but if you add the trailingslash / to the end → there is some 301 redirection :thinking:


Now when I run curl -v against the url I see the HTTP 301 message.

< HTTP/2 301
< date: Thu, 24 Feb 2022 13:55:11 GMT
< content-length: 0
< location:

And with the / added to the end of the URL path the curl is working again.


This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.