My Server IP is banned or blacklisted?


#1

I testing used curl to call api on my server ip[103.22.182.144] But Sometime it can’t connect api.

~$ curl --verbose "https://api.twitter.com/1.1/help/test.json"
* About to connect() to api.twitter.com port 443 (#0)
*   Trying 199.59.150.41... Timeout
*   Trying 199.59.149.232... Timeout
*   Trying 199.59.149.199... Timeout
*   Trying 199.59.148.20... Timeout
* connect() timed out!
* Closing connection #0
curl: (28) connect() timed out!

However some time it can connect :confused: :

$ curl --verbose "https://api.twitter.com/1.1/help/test.json"
* About to connect() to api.twitter.com port 443 (#0)
*   Trying 199.59.148.20... connected
* successfully set certificate verify locations:
*   CAfile: none
  CApath: /etc/ssl/certs
* SSLv3, TLS handshake, Client hello (1):
* SSLv3, TLS handshake, Server hello (2):
* SSLv3, TLS handshake, CERT (11):
* SSLv3, TLS handshake, Server key exchange (12):
* SSLv3, TLS handshake, Server finished (14):
* SSLv3, TLS handshake, Client key exchange (16):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSLv3, TLS change cipher, Client hello (1):
* SSLv3, TLS handshake, Finished (20):
* SSL connection using ECDHE-RSA-AES128-SHA
* Server certificate:
* 	 subject: C=US; ST=California; L=San Francisco; O=Twitter, Inc.; OU=Twitter Security; CN=api.twitter.com
* 	 start date: 2014-08-03 00:00:00 GMT
* 	 expire date: 2016-12-31 23:59:59 GMT
* 	 subjectAltName: api.twitter.com matched
* 	 issuer: C=US; O=VeriSign, Inc.; OU=VeriSign Trust Network; OU=Terms of use at https://www.verisign.com/rpa (c)10; CN=VeriSign Class 3 Secure Server CA - G3
* 	 SSL certificate verify ok.
> GET /1.1/help/test.json HTTP/1.1
> User-Agent: curl/7.22.0 (x86_64-pc-linux-gnu) libcurl/7.22.0 OpenSSL/1.0.1 zlib/1.2.3.4 libidn/1.23 librtmp/2.3
> Host: api.twitter.com
> Accept: */*
> 
< HTTP/1.1 400 Bad Request
< content-length: 61
< content-type: application/json;charset=utf-8
< date: Sun, 08 Feb 2015 13:23:30 UTC
< server: tsa_a
< set-cookie: guest_id=v1%3A142340181064900374; Domain=.twitter.com; Path=/; Expires=Tue, 07-Feb-2017 13:23:30 UTC
< strict-transport-security: max-age=631138519
< x-connection-hash: 7b59bfb732aefdffcaa53195c1dfadc7
< x-response-time: 5
< 
* Connection #0 to host api.twitter.com left intact
* Closing connection #0
* SSLv3, TLS alert, Client hello (1):
{"errors":[{"message":"Bad Authentication data","code":215}]}

I want to know - why it’s happened and have any solution to resolve this ?


#2

Since you’re able to connect sometimes, I would doubt that you have been blacklisted or blocked from accessing the API. You’re trying to access a non-existent resource in the test above (/1.1/help/test.json does not exist), but that obviously should not affect the connection timeouts. I’d suggest seeing which network hops are causing delays to see if you can diagnose this.