Live data from Hacker News

Icanhazip: A simple IP address tool survived a deluge of users (2021)

blog.apnic.net

91–100 of 146 posts

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#91
post #87
post #85

Earlier quoted context omitted.

There's a whole list of such resolvers: Akamai: dig +short whoami.akamai.net @ns1-1.akamaitech.net Google: dig +short o-o.myaddr.l.google.com txt @ns1.google.com Cloudflare: dig +short whoami.cloudflare ch txt @1.1.1.1 OpenDNS: dig -4 +short myip.opendns.com @resolver1.opendns.com Note that if you leave off the `@service.authoritative.nameserver` portion of all of the above, you get the IP address of the recursive re…

The opendns server does not return anything if I send the query to anything other than opendns.

Admittedly my comment was incredibly long, but I did include

> And like the parent comment mentions, OpenDNS somehow blocks requests that pass through a recursive resolver.

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#93
post #28

Why not use protocols which are specifically designed to report mapped IP address like STUN? It's faster as UDP exchange is shorter than 3-way TCP handshake (or even TCP+TLS handshake). Here is an implementation which uses parallel STUN queries to report address reliably as fast as possible: https://github.com/Snawoot/myip

This is very cool and something that'd be neat to roll into a toolset. But I think you're missing the point of izanhazip. It's meant to be quick and easily accessible regardless of where you are or what system you're on (assuming there's curl or similar installed).

I might not have permission or it wouldn't be reasonable to install something. And I can link it to customers or give them a simple command to run, and all it returns is the actual info I need from them.

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#94
post #90

Earlier quoted context omitted.

ipinfo.io's API and site is dualstack. But for IPv6 connection, you need to use v6.ipinfo.io for the API service. Even though nobody asked, I have to mention this every time there is a discussion about IPv6 and IP address data. According to domain name records, even if a site supports both IPv4 and IPv6 it defaults to IPv6. I would love to know why. I have come across a lot of people saying IPinfo doesn't support IPv…

> According to domain name records, even if a site supports both IPv4 and IPv6 it defaults to IPv6. I would love to know why. Newer is better? Good clients use the 'happy eyeballs' (rfc 8305) mechanism, which is roughly, open v6, wait a bit, open v4, use whichever connection comes back first. There's a bias towards v6 because often it's a more direct connection, and may work better, but it was also common to have non…

Don't forget about the new still-draft-but-already-used HTTPS DNS record type (no, that's not a typo)! I'm still fuzzy on its IP hint value(s) but it can potentially bypass A and AAAA records completely.

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#95
post #81

Earlier quoted context omitted.

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

/cdn-cgi/trace isn't available on just cloudflare.com, it's on every site they proxy too (there might be a setting somewhere to disable it yet it's on by default). I've yet to figure out what happens if your site also serves something there, yet it was surprising to see on a barebones site I had routed through them. I learned this from: https://news.ycombinator.com/item?id=36383258

TIL. Looks like they have it documented (since Apr 2022, based on the github history), it cannot be modified or customized, and that it sometimes causes problems with SEO crawlers!

https://developers.cloudflare.com/fundamentals/get-started/r...

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#96

Not related to the story of scaling the tech but rather to the IP business in 2023: I’m not affiliated with any of these services, but my goto has been ip4.me, ip6.me, and ip6only.me because they’re short and memorable and because they acknowledge the IPv4/IPv6 split. The first two domains give you your v4 and v6 IP respectively and the latter only resolves over IPv6 (useful to ensure your IPv6 is off when using a VP…

When helping someone over the phone, I get them to go to http://ipchicken.com

Very easy URL to relay, "do you see the chicken? let me know what the blue numbers are below it" - and most people seem to get a kick out of it!

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#97
post #81
post #30

For ridiculously easy things like this, I think it's smarter for you to just host it yourself. This way you are not forcing other people to carry your burden. nginx config example: location /ip { add_header Content-Type "application/json"; return 200 '{"host":"$server_name","ip":"$remote_addr","port":"$remote_port","server_ip":"$server_addr","server_port":"$server_port "}\n'; } Which will return something like this i…

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

   sni=plaintext
There was a great trial CF ran for a long period with a previous version of encrypted SNI (now ECH). One could get encrypted SNI with any site using CF via modified OpenSSL. But they stopped this experiment. Meanwhile ECH was still not ready.

If anyone is getting something other than "sni=plaintext" for a CF domain besides crypto.cloudflare.com, then please let us know how.

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#98
post #30

For ridiculously easy things like this, I think it's smarter for you to just host it yourself. This way you are not forcing other people to carry your burden. nginx config example: location /ip { add_header Content-Type "application/json"; return 200 '{"host":"$server_name","ip":"$remote_addr","port":"$remote_port","server_ip":"$server_addr","server_port":"$server_port "}\n'; } Which will return something like this i…

Another one

https://whatismyip.akamai.com/advanced?debug

https://ipv4.whatismyip.akamai.com

DNS-based

   drill whoami.akamai.net 
The second one might be useful to verify one is not using local, ISP-provided DNS, or to see whether a DoH provider effectively geolocates its users, e.g., Cloudflare.

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#99
post #30

For ridiculously easy things like this, I think it's smarter for you to just host it yourself. This way you are not forcing other people to carry your burden. nginx config example: location /ip { add_header Content-Type "application/json"; return 200 '{"host":"$server_name","ip":"$remote_addr","port":"$remote_port","server_ip":"$server_addr","server_port":"$server_port "}\n'; } Which will return something like this i…

Alternatively, with Caddy (with automated TLS, single static binary): example.com { handle /ip { header Content-Type application/json respond `{"host":"{host}","ip":"{remote_host}","port":"{remote_port}"}` } } Though the usefulness of the host (client specified it), remote port (it's random), and server ip/port (it's static and not useful for the client) are questionable.

Useful for UA sanity checking I guess

Re: Icanhazip: A simple IP address tool survived a deluge of users (2021)

#100

Not related to the story of scaling the tech but rather to the IP business in 2023: I’m not affiliated with any of these services, but my goto has been ip4.me, ip6.me, and ip6only.me because they’re short and memorable and because they acknowledge the IPv4/IPv6 split. The first two domains give you your v4 and v6 IP respectively and the latter only resolves over IPv6 (useful to ensure your IPv6 is off when using a VP…

When helping someone over the phone, I get them to go to http://ipchicken.com Very easy URL to relay, "do you see the chicken? let me know what the blue numbers are below it" - and most people seem to get a kick out of it!

A long time ago I spent a bit too long debugging something to later find out the "source port" that displays isn't right! It's still not right! I obviously fixed this by making my own site (https://ip.wtf).
Post reply on HN