Live data from Hacker News

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

blog.apnic.net

61–70 of 146 posts

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

#62

I used to use ipchicken and some others, but now I just type “what is my ip” into google and get it that way. Not suitable for automation but in my case it’s just a quick manual check.

curl ipinfo.io or ipinfo.io/ip

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

#63
post #39
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

Because one requires you to merely type a simple URL in your browser that you already likely have open, the other requires you to install Go, clone a git repo, compile the program, install the program, and THEN finally run the program.

... only to be blocked by the corporate firewall which doesn't allow anything besides tcp/80 and tcp/443.

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

#64
Ah Major Hayden. Great guy. I remember getting a crash course on system administration in Slicehost’s IRC channel because some idiot ran an ancient Java application server on an open port. We got hacked and I got volun-told to clean up the mess because I was the only person running Linux on my laptop.

Everyone was so nice and I learned so much. I owe them all a lot of drinks. :)

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

#65
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…

Ok, I'll bite... What kind of machine do you host this on that can handle 400,000 of these requests (with TLS mind you) per second? That was the load he mentions it handling in 2021, he stopped mentioning requests per day metrics after that.

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

#66
post #23

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…

Does Chrome not recognize the .me TLD? I just tried to type that ip4.me domain twice and it just sent me to search results.

I think that would be very surprising to the fine people of Montenegro.

Check your local DNS configuration and your spelling, something is likely hijacking NXDOMAINs.

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

#67
post #49

Earlier quoted context omitted.

Icanhazip.com will do the same. They have ipv4.icannazip.com and ipv6.icannazip.com where they will return that.

so 3, 2 less memorable sites, ok got it

I’d say that is up you. I can never remember what tld those other sites used. I’ve been using icanhazip since many years. I seem to remember it fine.

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

#68
post #43

Slightly related: There used to be a DNS server that you could query a TXT record and the response would include the IP of the server that submitted the query. You could use it to debug DNS issues. I thought it was from DNS-OARC but I can't find it anywhere. Does anyone know a way to accomplish this?

You could write a program that listens on port 53, parses the query and returns the correct value?

DNS is hard to implement, but for responding to a very specific type of query, should be easy?

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

#69
post #23

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…

Does Chrome not recognize the .me TLD? I just tried to type that ip4.me domain twice and it just sent me to search results.

Works for me (heh).

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

#70
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…

Probably more efficient to use https://lib.rs/hyper - and actually maintainable.

I can't say a thing about efficiency, but for maintainability, I have to disagree. This seems to be a rust library, and for maintaining that, you'd need to write a program, compile it every time some updates come by, rerun the recompiled program, ...

With the parent comment example, all you need is nginx, available as a package on all distros, and a single static config file. With an auto-updating package manager and a service manager, one never needs to write anything else apart from that static config file.

Or did you mean something else with "actually maintainable"?

Post reply on HN