Hacker News new | ask | show | jobs
by lxgr 476 days ago
Oh no, this has been my go-to site for connectivity tests (as example.com seems to be cached fairly aggressively by my browsers and that has misled me in the past). Ad-free, minimal, does exactly what it needs to and nothing more.

Rest in peace!

Edit: All these (great and much appreciated!) responses of alternatives are making me wonder if this should in fact be a standardized service that could then be offered as a public good in a similar way as pool.ntp.org.

Checking for generic Internet connectivity (i.e. not only having an IP address, but being able to reach public sites, these sites being non-cached, not-captive-portaled etc.) seems like a problem that too many apps, scripts, and devices are solving again and again.

11 comments

ifconfig.me is a similar service which I often use. It has a nice feature that if you do "curl ifconfig.me", you'll get only a string with the ip address, no markup.
This site is behind cloudflare and has captcha-blocked my queries more than once.
ifconfig.me is not behind Cloudflare, at least currently.
On a Reddit post, someone mentioned ip.wtf that they created as a similar service. Aside from using it in a browser, it also provides a single IP address with curl ip.wtf, with less typing. I also like getting more information by using this: curl --json "" ip.wtf
Me too, but that's a whopping 5 characters more. Think of all the extra keyboard wear!

I do like the curl-ability of that one a lot, though, and on my own computer I can just configure an alias or shell function for it :)

Try "curl ip.wtf" to save your keyboard :)
I've been using ipinfo.io now for several years and have been very pleased with them.

You can `curl https://ipinfo.io/` and get a JSON blob back with info on your current IP. If you pass an IP explicitly you can get info back on it, for example `curl https://ipinfo.io/104.26.7.98`. Easy to combine with jq also for use in scripts: `curl https://ipinfo.io/104.26.7.98 | jq -r '.ip'`

For personal use it's free, and they have reasonable pricing for large volume. No affiliation on my part, just a happy user.

Instead of jq .ip, please use https://ipinfo.io/ip

This API endpoint has its dedicated stack and infrastructure to support unlimited lookups.

Also, for IPv6 connection use: https://v6.ipinfo.io/ip

PS: I am the DevRel of IPinfo.

Annoyingly, they no longer show your IP on their web homepage.
We are experimenting with some design choices as we try to highlight all the IP metadata we have and move towards being an "internet data" company instead of just an IP location company.

I highly recommend you check out the page: https://ipinfo.io/myip

I understand the data we have for your IP address is not front and center anymore. We have gone through several iterations of designs for our homepage, so if you have any suggestions, I will relay them to our team.

"I don’t want anyone to see our address and opening hours without also reading through our values, our mission statement, and board of directors"
Our priority is always the developer experience and I apologize for the friction you are seeing here.

The issue is that we are truly in a unique space when it comes to internet data. We have gone through several iterations on how to present the full extent of data and not just your public IP address.

If you are a regular user of our service, you know that we have a very open access approach to our data. We provide most of our data for free through our website, we have a generous API, and we have a fully accurate open access licensed database. We also have more free services to be released!

Due to the open data approach, developers appreciate us. We are not trying to create any barriers or friction here, but we are trying to find a balance. If you have any suggestions that can encourage users to explore our data while simultaneously providing everyone with a frictionless experience with our data, please let me know.

> The issue is that we are truly in a unique space when it comes to internet data.

You serve people their IP address. There’s tens of sites doing the same in this very thread.

Hello, AT&T.
It's a service that shows visitors their own address and metadata about it. Seems fair to not want to provide that for free without some advertisement for the paid version or the company?
Absolutely. Actively degrading the user experience might have the opposite effect, though.
`curl https://myip.wtf/json` too is nice to use when debugging things
If you have the resources to maintain it, you can contact the estate. (They'd like to sell the domains, so unless they're bundled with Brickshelf the highest bidder will probably be a traffic-farming company or something, but you never know.)
For services like this, I always use my own domain which can easily be re-mapped or hosted myself. E.g. "checkip.mydomain.com"
icanhazip.com provides a similar service and has a good story behind it [0]

[0] https://blog.apnic.net/2021/06/17/how-a-small-free-ip-tool-s...

I use ip.me it's not add free, but in curl you can have an ad free version by doing curl -4 ip.me or curl -6 ip.me since it will only send the ip when it detects curl I guess.
I'll just.. leave this here

https://cloudflare.com/cdn-cgi/trace

That’s a lot worse to type, but good to know.
You can also use dig to get your external ipv4. That prevents reliance on smaller sites

Don’t have the command on hand but easily searchable

How so? Getting your public/external IP does not seem possible behind a NAT without an external service.
No idea. All I can tell you is that it works and if I need to hard code a IP check like this then I’d rather rely on a big player like Google or cloudflare ns than someone’s project site
Not sure if I'd trust an undocumented Google feature without any SLA more, to be honest. Rumor has it that Google have discontinued a service or two before.
What command line do you use?
dig whoami.cloudflare ch txt @1.1.1.1 +short
You can use dig:

  dig +short -4 myip.opendns.com @resolver1.opendns.com
(still an external service, but not reliant on a website)
That's just another protocol in the end (DNS vs. HTTP), or am I missing something?

DNS also runs a higher risk of being cached or mangled somewhere along the way by middleboxes. HTTPS avoids that problem.

I usually use `curl ifconfig.me`
checkip.amazonaws.com is my goto, not as short tho :/
I was recently looking for IPv4/IPv6-only HTTP services hosted by major CDNs (for https://github.com/pmarks-net/ipvfoo/issues/60), and found these:

Cloudflare: https://ipv4.icanhazip.com + https://ipv6.icanhazip.com

Akamai: https://ipv4.whatismyip.akamai.com + https://ipv6.whatismyip.akamai.com

The problem with https://checkip.amazonaws.com is that it neither supports IPv6, nor claims that it will remain IPv4-only, so it's not clear what you'll get in the future.

ip.guide is also a great one. Provides a json payload with relevant information. I have no affiliation with it, just happy user!