anaganisk / digitalocean-dynamic-dns-ip

A simple script to automatically update Digital ocean DNS records with dynamic IP
Other
104 stars 22 forks source link

IP lookup API not longer provided by third-party #19

Closed aleckloiselle closed 2 years ago

aleckloiselle commented 2 years ago

From whatismyipaddress.com:

Public IP Address As of November 10, 2021 we are no longer providing this API due to massive abuse.

bot.whatismyipaddress.com – Responds to IPv4 & IPv6 queries – This API is no longer available ipv4bot.whatismyipaddress.com – Responds to IPv4 queries only – This API is no longer available ipv6bot.whatismyipaddress.com – Responds to IPv6 queries only – This API is no longer available

This completely breaks the script. Could we replicate the response on a second service and pass that URL as a config param? Any examples of what the old response was?

praveenroot03 commented 2 years ago

Hi @aleckloiselle, seems like a severe issue. But I have resolved this issue by using this free API service https://api.ipify.org/. It also provides results in both JSON and plain text format. Although, tool only accepts the plain text format you can directly use the API endpoint to get it. For further info, you can refer to https://www.ipify.org/

johnjaylward commented 2 years ago

As noted by @praveenroot03 , once you find a service that you can work with, you can just update your configuration to use the new services. See the example configuration : digitalocean-dynamic-ip.sample.json

These 2 parameters are what you should change to use a new service:

johnjaylward commented 2 years ago

Here is an example using the ipify.org API:

{
    "ipv4CheckUrl" : "https://api.ipify.org/?format=text",
    "ipv6CheckUrl" : "https://api64.ipify.org/?format=text",
    // other config options
}