Follow

curl https://icanhazip\.com # Easy way to find your public IP address that is friendly to CLI users. There are many others, but ask yourself:

1) Do you have to parse the output?

2) Do they have SSL?

3) Have they been around for a while?

4) Are they IPv6 ready?

@climagic someone should make one that works over raw TCP. Or over DNS.

@Wolf480pl @climagic
dig +short myip.opendns.com ANY @resolver1.opendns.com
(You need ANY to get either A/IPv4 or AAAA/IPv6 as appropriate. Luckily OpenDNS doesn't implement RFC 8482 yet.)

@voidptr @climagic
nice... but if I dig it through my ISPs resolver or through 8.8.8.8, it says NXDOMAIN. Is it filtered or sth?

@Wolf480pl If you dig through your ISP's resolver, OpenDNS can't determine your IP (since you don't have a direct connection with them). They've probably implemented blocking of some sort to avoid confusing people in that case.

@voidptr yeah, thought about that right after my previous post.

@climagic I use a tiny thing in my nginx config to make my own ip lookup:

location /ip {
default_type text/plain;
return 200 $remote_addr;
}

Looks like this in practice: tomasino.org/ip

@climagic #identME checks all four, and also proposes different API calls : api.ident.me

works pretty well !

Sign in to participate in the conversation
Mastodon

Server run by the main developers of the project 🐘 It is not focused on any particular niche interest - everyone is welcome as long as you follow our code of conduct!