News for hackers. Stuff that matters.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by ComputerGuru on Monday July 31, 2023 @05:37PM (#36949227)
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 VPN). You can tack on /api to any of them to get a plaintext response.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by 0x6A75616E on Monday July 31, 2023 @05:45PM (#36949290)
the issue is that these return a bunch of html so using them from the command line is not ideal.

I made wgetip.com back in 2008 to solve this. icanhaz must've been pretty suboptimal back then to have issues with traffic. wgetip still gets about 3M requests per hour. All from a single $5 droplet.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by zokier on Monday July 31, 2023 @05:47PM (#36949317)
ip4.me and ip6.me have /api endpoint for programmatic access
Re:Icanhazip: A simple IP address tool survived a deluge of ... by SadTrombone on Monday July 31, 2023 @06:28PM (#36949742)
The /api endpoint seems to return me a 301 error from the command line.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by ComputerGuru on Monday July 31, 2023 @06:35PM (#36949796)
That’s a redirect, not an error. Probably to /api/ with a trailing slash. Or use the -l flag to curl to have it auto redirect.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by jffry on Monday July 31, 2023 @06:32PM (#36949772)

  curl https://ip4.me/api/
works for me
Re:Icanhazip: A simple IP address tool survived a deluge of ... by pepa65 on Tuesday August 01, 2023 @04:52AM (#36953870)
There, /ip is better.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by pepa65 on Tuesday August 01, 2023 @04:48AM (#36953841)
Best thing to try first is to append /ip I've found.

For wgetip.com that is not needed of course. But I haven't found a way to get the IPv4 address there...

Re:Icanhazip: A simple IP address tool survived a deluge of ... by NelsonMinar on Monday July 31, 2023 @05:48PM (#36949330)
https://www.ipify.org/ is my go to, mostly because it has a really simple JSON version. Funny how many ways there are to do this simple thing.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by pepa65 on Tuesday August 01, 2023 @04:23AM (#36953683)
https://api.ipify.org/ works to just get text IP.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by pests on Monday July 31, 2023 @06:12PM (#36949596)
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.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by kiwijamo on Monday July 31, 2023 @08:09PM (#36950650)
Edge works just fine which is interesting.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by owenmarshall on Monday July 31, 2023 @08:36PM (#36950852)
I think that would be very surprising to the fine people of Montenegro.

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

Re:Icanhazip: A simple IP address tool survived a deluge of ... by bla3 on Monday July 31, 2023 @08:45PM (#36950911)
Works for me (heh).
Re:Icanhazip: A simple IP address tool survived a deluge of ... by paradox460 on Monday July 31, 2023 @07:27PM (#36950292)
I like ifconfig.me because it returns the IP along with some other little bits of useful information, and works great with curl
Re:Icanhazip: A simple IP address tool survived a deluge of ... by erinnh on Monday July 31, 2023 @07:46PM (#36950479)
Icanhazip.com will do the same.

They have ipv4.icannazip.com and ipv6.icannazip.com where they will return that.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by sitzkrieg on Monday July 31, 2023 @08:07PM (#36950641)
so 3, 2 less memorable sites, ok got it
Re:Icanhazip: A simple IP address tool survived a deluge of ... by erinnh on Monday July 31, 2023 @08:39PM (#36950872)
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 ... by pepa65 on Tuesday August 01, 2023 @04:45AM (#36953817)
Replace the double nn in your post by nh and it will work better ;-)
Re:Icanhazip: A simple IP address tool survived a deluge of ... by erinnh on Wednesday August 02, 2023 @02:40PM (#36975089)
Thanks. Phone keyboards are hard sometimes.
Re:Icanhazip: A simple IP address tool survived a deluge of ... by reincoder on Monday July 31, 2023 @09:36PM (#36951259)
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 IPv6. The internet as an ecosystem doesn't completely support IPv6, but we do. So, mentioning it constantly in every discussion is my current approach.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by toast0 on Monday July 31, 2023 @10:25PM (#36951610)
> 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 working AAAA records, so a delayed fallback is preferable to no fallback as used to be common.

Re:Icanhazip: A simple IP address tool survived a deluge of ... by Caligatio on Monday July 31, 2023 @11:03PM (#36951819)
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 ... by hayyyyydos on Monday July 31, 2023 @11:54PM (#36952084)
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 ... by dgl on Tuesday August 01, 2023 @12:35AM (#36952348)
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).
Re:Icanhazip: A simple IP address tool survived a deluge of ... by pepa65 on Tuesday August 01, 2023 @04:21AM (#36953667)
Great service! Very informative. If you could also implement ip.wtf/ip or some such, it might decrease your bandwidth..!
Re:Icanhazip: A simple IP address tool survived a deluge of ... by dgl on Tuesday August 01, 2023 @05:46AM (#36954171)
Thanks!

No need for a /ip, just doing:

$ curl ip.wtf

... will do the right thing, or if your user-agent isn't curl send a header of "Accept: text/plain" and you'll get the plain text version (see https://ip.wtf/about for more).

Re:Icanhazip: A simple IP address tool survived a deluge of ... by ComputerGuru on Sunday August 06, 2023 @03:15AM (#37019656)
And no need for an IPv4 or IPv6 mode url/param since curl -4 or curl -6 will do the trick!
Re:Icanhazip: A simple IP address tool survived a deluge of ... by pepa65 on Tuesday August 01, 2023 @04:17AM (#36953653)
Gives a CloudFlare 520 error for me...
Re:Icanhazip: A simple IP address tool survived a deluge of ... by pepa65 on Tuesday August 01, 2023 @04:09AM (#36953605)
And if you attach /ip you get only the IP address (as /api also includes the URL of the documentation).