HTTP Client Connect Timeout when curl command on same device works with the same endpoint

You seem to be running this test from the script console, which means your script executes in the Designer, and the connection originates from the computer running the Designer. That you can curl from the CLI on that server is not relevant - can you make it work from your machine?