Live data from Hacker News

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

blog.apnic.net

101–110 of 146 posts

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

#101
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.

Bad cert. The common name does not match the subdomain.

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

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

Now I just need the apache config for this...anyone?

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

#103

Earlier quoted context omitted.

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.

Bad cert. The common name does not match the subdomain.

Certificate says CN is a248.e.akamai.net

CNAME for whatismyip.akamai.com is a1524.g.akamai.net

Probably no certitifcate that lists whatismyip.akamai.com

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

#104
what an amazing letter, thank you for your service!

icanhazip is part of internet lore, and passing it on to Cloudflare is a very noble thing to do! Cloudflare, please stay true to the idealistic principles of simplicity and availability for the service.

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

#105
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.

Wasn't the original target of nginx back in the nineties to hit 100k requests per second with less overhead than (at the time, standard) apache2?

With that in mind + the general advancing of hw since then, it wouldn't be too suprising if nginx could handle that load easily. It'd just get more difficult if you wanted to put anything else (ie. metrics) on that endpoint since afaict nginx doesn't have anything to monitor those things if you don't have the Enterprise version of their tools.

In any case you might be misreading the setup for the parent here - the recommendation is just that if you're doing this in the context of a webapp, that this sort of behavior is trivially easy to bounce back in JSON using nginx.

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

#106
post #82

Earlier quoted context omitted.

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…

I would trust the rust compile/rerun process a lot more than an auto-updating linux distribution, personally. Sooner or later that auto-updating package manager will break your config file, itself, or both.

The majority of nginx distributions will not get any major bumps during the lifetime of the distros they're in. Whether that's because the distro itself has policies against that (Debian, Ubuntu) or because the distro version expires before nginx' stable release does (most of the ones with a higher update frequency, ie. Fedora) so by the time the version expires, they can just go to the next stable version on the release after. This is pretty much only a risk if your distro is completely rolling release and even those in my experience at least offer an "lts" package of some sort.

So that's not a problem. Besides the majority of nginx setups don't rely on too fancy things; most of the stuff that gets changed in updates that affect config files are the fancier nginx modules.

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

#107
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?

In addition to the others, there is also https://www.dns.toys/

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

#108
Earlier today, I talked with my ex-colleague about things being bloated and unnecessarily complicated in software. Here we have a perfect example.

  $ curl -v icanhazip.com

  > GET / HTTP/1.1
  > Host: icanhazip.com
  > User-Agent: curl/8.2.1
  > Accept: */*   
curl is being curl here: protocol, host, shortest possible user-agent string, nothing extra. Let's see the reply:

  
Okay.

  
I am not sure, is it really necessary? I will use NTP if I need to know the current GMT. RFC doesn't state this header as mandatory.

  
Okay, nice to know.

  
Really? What's a use case here? Do I need to be reminded of my IP again in a few seconds? Or is it in case my IP will quickly change? Oh, never mind...

  
Now, this is a bit ridiculous. Why would the fetch-based browser app rely on a third-party service to determine the client's IP?

  
Why, oh why? Why do I need to receive this and keep it somewhere? All I want is to haz IP! Can I only haz IP?

  
Okay, a little vanity never killed nobody.

  
I know what Cloudflare Ray is. The question is: why do I need it here?

  
Good to know, maybe, but to be honest - this is redundant too.

  xxx.xx.xx.xx [my IP address, masked for privacy reasons]
At last! Now I can do my thing with the IP I just haz.

I will not rant here about extra bytes transferred, extra bandwidth congested, extra electricity burned, and so on. Sapienti sat. Two side notes: it replies with HTTP 1.1 on HTTP 1.0 request, and it still puts alt-svc header into https reply.

I rest my case.

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

#109

Earlier today, I talked with my ex-colleague about things being bloated and unnecessarily complicated in software. Here we have a perfect example. $ curl -v icanhazip.com > GET / HTTP/1.1 > Host: icanhazip.com > User-Agent: curl/8.2.1 > Accept: */* curl is being curl here: protocol, host, shortest possible user-agent string, nothing extra. Let's see the reply: Okay. I am not sure, is it really necessary? I will use N…

Just use plain curl and all you are getting is the IP.

It was conceived this way to be used in scripts. I don't see why you might want to -v here except to prove a non existing point that you made up.

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

#110
post #109

Earlier today, I talked with my ex-colleague about things being bloated and unnecessarily complicated in software. Here we have a perfect example. $ curl -v icanhazip.com > GET / HTTP/1.1 > Host: icanhazip.com > User-Agent: curl/8.2.1 > Accept: */* curl is being curl here: protocol, host, shortest possible user-agent string, nothing extra. Let's see the reply: Okay. I am not sure, is it really necessary? I will use N…

Just use plain curl and all you are getting is the IP. It was conceived this way to be used in scripts. I don't see why you might want to -v here except to prove a non existing point that you made up.

Because I was interested in the whole response, not it's text/plain part. All those headers are still there, even if I don't use them.
Post reply on HN