query for IP working no more

Post your general questions about IP address here.
Locked
guy_c
New Member
Posts: 2
Joined: Sat Feb 15, 2020 9:52 am

query for IP working no more

Post by guy_c » Sat Feb 15, 2020 10:18 am

My Arduino used to query bot.whatismyipaddress.com for its public IP every two hours. Starting yesterday, Feb 14th, evening, the server returns: (please ignore the timestamp)

18:55:53.241 HTTP/1.1 301 Moved Permanently
18:55:53.254 Date: Sat, 15 Feb 2020 16:55:44 GMT
18:55:53.274 Connection: close
18:55:53.282 Cache‑Control: max‑age=3600
18:55:53.295 Expires: Sat, 15 Feb 2020 17:55:44 GMT
18:55:53.311 Location: https://bot.whatismyipaddress.com/
18:55:53.331 Alt‑Svc: h3‑25=":443"; ma=86400, h3‑24=":443"; ma=86400, h3‑23=":443"; ma=86400
18:55:53.368 Server: cloudflare
18:55:53.382 CF‑RAY: 5658cfa9cedf176a‑FRA


and poor Arduino is lost... Can someone please help?

Thank you!

User avatar
Chrispcritters
Forum Administrator
Posts: 2538
Joined: Tue Mar 02, 2010 5:41 pm
Location: 127.0.0.1 | ::1
Contact:

Re: query for IP working no more

Post by Chrispcritters » Sat Feb 15, 2020 12:11 pm

It looks like with the move of the automated query backend connections are now being forced to be secure rather than allowing both secure and insecure queries. I'll do some digging and see if we can stop forcing this.

In the meantime... if you update the query being done by the Arduino to https:// vs http:// that should resolve the issue.
Founder & CEO of WhatIsMyIPAddress.com.
You can follow me on Twitter and Facebook for some behind the scenes info.

guy_c
New Member
Posts: 2
Joined: Sat Feb 15, 2020 9:52 am

Re: query for IP working no more

Post by guy_c » Sun Feb 16, 2020 11:05 am

Hello,

Thank you very much for your quick reply. I was not informed of it but now I toggled the correct switch :)
I tried to modify
client.println("GET / HTTP/1.0");
to
client.println("GET / HTTPS/1.0");

but than "api.ipify.org" is unhappy. In order to have a low load on the servers I roundrobin three severs:

const char * IPserver[]={"bot.whatismyipaddress.com", "api.ipify.org", "icanhazip.com"};

and make a query every ~2 hours to one of them. I would not love to have different api for each and was happy to see that these three have the same api. Of course with a specific api per server I could find many more but am trying to minimise the effort :)

I think that the only quick and dirty solution for me for the time being is to remove "bot.whatismyipaddress.com" from the list

Thanks again for your help

Locked

Who is online

Users browsing this forum: No registered users and 5 guests