14 ms·
Ifconfig.co – Hacker-friendly “What is my IP address”
- mazamats 6y agoI prefer ipinfo.io You can even lookup info for other up addresses. E.g. https://ipinfo.io/1.1.1.1 https://ipinfo.io/1.1.1.1
- mazamats 6y agoPlus if you use curl, it will return JSON instead of HtML
- klohto 6y agocurl ifconfig.co/json
- jodrellblank 6y agoIf you use powershell / invoke-restmethod it will return json and get deserialised into a structured object, too. PS C:\> irm ipinfo.io PS C:\> $x = irm ipinfo.io PS C:\> $x.timezone Europe/London Personally, I use http://checkip.dyndns.org/ http://checkip.dyndns.org/ by habit, with its one-line return.
- majkinetor 6y agoNo it wont, server need to return JSON format itself. Your example doesn't work. It needs to be: irm ipinfo.io/json Your other example can be get like this: irm http://checkip.dyndns.org | % HTML | % body
- JimDabell 6y agoIt will work. The server will return JSON. The URL http://ipinfo.io/ http://ipinfo.io/ returns HTML if the Accept header indicates that you want HTML, and JSON if there is no header, a wildcard header, or a header that requests JSON. As far as I can see, irm doesn’t add an Accept header, so the command jodrellblank provided will fetch JSON and work correctly.
- majkinetor 6y agoDoesnt work on Windows 10 using latest pwsh
- jodrellblank 6y agoWorks on Windows 10 using Windows PowerShell. In Pwsh it does seem to need /json
- tyingq 6y agoThis one supports other IPs also: https://ifconfig.co/?ip=1.2.3.4 https://ifconfig.co/?ip=1.2.3.4 And JSON: https://ifconfig.co/json?ip=1.2.3.4 https://ifconfig.co/json?ip=1.2.3.4
- mazamats 6y agoThe URL is cleaner with ipinfo.io, don't have to specify GET parameters with it.
- jfk13 6y agoI don't know where this is pulling data from, but: > Country United Kingdom > Country (ISO code) GB > In EU? true Well, that's inaccurate for a start.
- Jonnax 6y agoI presume the reason is GDPR checking. Has the UK data protection law deviated significantly from GDPR?
- jfk13 6y agoAFAIK data protection law has not (yet, at least) deviated significantly in the UK vs GDPR. But if that's the reason, it should be labelled as such: "GDPR applies" or something.
- gspr 6y agoIf that is the case, then it's incorrectly showing false for Norway, who as an EEA member is subject to the GDPR.
- drdec 6y agoIt is a GitHub project, there's already an issue for the UK: https://github.com/mpolden/echoip/issues/130 https://github.com/mpolden/echoip/issues/130 Perhaps you ought to open one for Norway? (I don't think it would be appropriate for me to do it because I am not seeing the issue, not being in Norway.)
- gspr 6y agoDone, thanks
- kuroguro 6y ago> I don't know where this is pulling data from Free version of MaxMind's GeoIP - a lot of services use them but the free version is the most inaccurate. That being said, not sure it's a mistake on the EU thing?
- georgiecasey 6y agoLooks great but these services have a tendency to come and go. Bad actors just end up hammering it. But I've been using icanhazip.com for years and it's still going strong.
- Frost1x 6y agoI tend not to use these sort of services except for quick hack purposes, which I suppose this is exactly designed for. Unfortunately, those needs vary so widely I can't try to keep track of these sort of services and just Google/DDG for something similar when I need it. Unless this pops up on the first page of a Google/DDG search, it's unlikely I'll ever use it. If the software behind the service is available and looks like it'll be easily usable for years because it has few to no dependancies that are likely to deprecated, I might actually commit the effort to memory and use it for all similar demands, similar to how I keep track of specific CLI *nix tools which I can rest assured, even if there are no updates and potential security issues, most are going to be usable at some future date in a pinch.
- EnigmaCurry 6y agoDDG will straight up tell you what your ip/geo location is, just search "ip address"
- curryst 6y agoI've been using ipecho.net for a while as well. Just ipecho.net/plain to get your IP back in plaintext. Not affiliated, just what I've been using.
- 6y ago
- SXX 6y agoIf someone want non-rate-limted IP info here is: https://lumtest.com/myip.json https://lumtest.com/myip.json https://lumtest.com/echo.json https://lumtest.com/echo.json It's powered by largest residential proxy network so they almost certainly never gonna ban your IP.
- koolba 6y agoWhat is a residential proxy network?
- paxo 6y agoyeah that seems interesting
- judge2020 6y ago$ whois 52.202.152.73 OrgName: Amazon Technologies Inc. I guess Amazon? Would be funny if this actually ran over Amazon Sidewalk but I doubt that.
- weird-eye-issue 6y agoYou are looking at the IP of lumtest.com not the service behind it which is what the OP was referring to.
- GoblinSlayer 6y agohttps://en.wikipedia.org/wiki/Luminati https://en.wikipedia.org/wiki/Luminati
- duskwuff 6y agoA wretched hive of scum and villainy. But seriously, it's basically a front end to a bunch of people who have been incentivized (or fooled) into installing a proxy server on their home computers. It's primarily of interest as a way to make certain types of fraud (like ad fraud and credit card fraud) much harder to detect.
- kalleboo 6y ago
- raesene9 6y agohttp://icanhazip.com/ http://icanhazip.com/ is my favourite one of these services, for simplicity and also as I can always remember the URL :)
- kuroguro 6y agoI use https://wtfismyip.com/ https://wtfismyip.com/ for similar reasons :)
- masterofmisc 6y agojust went there.. Oh dear!
- Izkata 6y agoThey keep with the theme even in API requests: https://wtfismyip.com/json https://wtfismyip.com/json
- anthropodie 6y agoThe first thing I read was "yourFuckingISP":"BSNL" and I was like yup that's right. :D
- kalleboo 6y agoThis one also shows both your IPv6 and your IPv4 at the same time, which none of the other ones linked in these comments seems to do
- throwaway744678 6y agoPro of icanhazip.com is that you can curl it directly, it returns your address and nothing else; you don't have to parse the result to get the value, which is a big plus when used in a script: curl icanhazip.com curl ipv4.icanhazip.com curl ipv6.icanhazip.com
- psychometry 6y agoNot sure I'd trust the expertise of someone who doesn't know how to redirect to https...
- ktpsns 6y agoFor a service like this one, it is essential not to automatically redirect to https, because many simple and/or command line clients do not automatically follow (resolve) a HTTP redirect answer. This service also works perfectly fine with https://ifconfig.co/ https://ifconfig.co/
- kalleboo 6y agoIt's not as if your IP address is private information, it's right there in the headers...
- GoblinSlayer 6y agoIsn't it the user agent's job to support your preferences?
- teekert 6y agoNice, I'm gonna miss the chicken [0] though... or not, the IP chicken is very easy to remember. [0] https://ipchicken.com/ https://ipchicken.com/
- 4mine 6y agoHere is my favorite. only using DNS: $ nslookup myip.opendns.com resolver1.opendns.com
- yakubin 6y agoWow. That's a great idea! nslookup is available on more devices than curl/wget.
- e12e 6y agoPut it another way, if you cannot lookup dns, odds are curl won't work. Of course, some nets might require the use of internal dns servers and block outbound traffic to dns.
- john37386 6y agoI always like to learn new trick. I'm definitely adding this nslookup trick to my IT swiss army knife kit. Thanks
- shaicoleman 6y agoWith dig: $ dig +short @resolver1.opendns.com myip.opendns.com
- akamhy 6y agohttps://ifconfig.me/ https://ifconfig.me/ $ curl ifconfig.me 129.6.255.60 $ curl ifconfig.me/all ip_addr: 129.6.255.60 remote_host: unavailable user_agent: curl/7.68.0 port: 52332
- koolba 6y agoBiggest gripe with ifconfig.me is the default cURL response does not include a newline.
- pluc 6y agoYou can also hit v4.ifconfig.co to force ipv4
- yakubin 6y agoIt's very good that it doesn't redirect to HTTPS. I frequently work with little devices which have a curl/wget version that only supports very basic HTTP, but no HTTPS. It's always a pain to find a website which will work with that.
- nerdponx 6y agoIt's great to have services like this. For the benefit of anyone interested: for a "self-hosted" solution, you can do this entirely within Nginx. Here's an example config: server { listen 80 default_server; listen [::]:80 default_server; listen 443 default_server; listen [::]:443 default_server; # Use Letsencrypt for SSL. This part will depend on your own setup. ssl_certificate /etc/letsencrypt/live/<my domain>/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/<my domain>/privkey.pem; server_name <my domain>; # Deny all access at all paths; useful if you're hosting other stuff behind # the same Nginx server (e.g. reverse proxy) location / { deny all; } # At /ip, return 200 with the client IP address in the body location = /ip { default_type text/plain; return 200 '$remote_addr'; } }
- VWWHFSfQ 6y agothis service does a lot more than just return your remote_ip, which wont work behind a load-balancer or other proxy unless you configure realip module. and also need to add geoip module to do all the location stuff
- nerdponx 6y agoGood points both. That said, do you know of any software library that exposes the Geoip database (or at least Geoip Lite which you one easily obtain for free) in a nice API? Like how a lot of programming languages have tzinfo/tzdata libraries for querying the Tz database.
- cryvate1284 6y agoMaxmind do APIs for a bunch of language. I've used the python one and it works well (with Lite), but see here their list: https://dev.maxmind.com/geoip/geoip2/web-services/ https://dev.maxmind.com/geoip/geoip2/web-services/
- nerdponx 6y ago
- hankchinaski 6y agois the "Is EU?" flag up-to-date? a UK Ip address yields true, Switzerland one yields false
- saurik 6y agoI mean, if you really really want my IP, you need to at least be asking for microphone or video permissions... otherwise, you are only going to get my default route! I work on a VPN product, and threw this together to get all my IP addresses, VPN be damned ;P. https://rv.saurik.com/wtfip/ https://rv.saurik.com/wtfip/
- crazybigdan 6y agoFor what it is worth, I have found that the STUN protocol is also an option for discovering this sort of information. There are lists of public stun servers out there [0]. Finding a client is a little more difficult than just using curl, I grant, but not impossible. [0]: https://gist.github.com/mondain/b0ec1cf5f60ae726202e https://gist.github.com/mondain/b0ec1cf5f60ae726202e
- plattyp 6y agoI just use the maxmind API directly, which is super cheap and has no rate limit to my knowledge. This site is using the maxmind dataset anyways. https://dev.maxmind.com/geoip/geoip2/web-services/ https://dev.maxmind.com/geoip/geoip2/web-services/
- kps 6y agoI wish sites would prefer browser-provided location to services like these. I'm constantly being placed in some random city five or six hundred km away, where my ISP also happens to have customers, even though I have Firefox configured to report accurately (geo.provider.network.url = data:application/json,{"location":{"lat":43.5,"lng":-80.5},"accuracy":1000}).
- madhato 6y agoSimilar service but with a frontend web development focus: https://whatsmybrowser.info/ https://whatsmybrowser.info/
- INTPenis 6y agoI know a guy who owns the domain ipa.sh that he intended to use as a replacement for ifconfig.me because it was slow and unavailable a lot. Referring of course to the new Linux commands "ip a sh". :) I hope he gets around to deploying it properly some day.
- achairapart 6y agoSlightly OT: Some similar services also expose useful data like if IP is a VPN, a threat/bot, hosting provider or ISP, or a proxy. I always wondered where this info comes from, looking at the similar pattern I presume from the same provider. Is it a premium service from MaxMind or what?
- alam2000 6y agoTry to look at IP2Proxy proxy detection API. It has the VPN, threat etc.
- desktopninja 6y agoMy 2cents: http://checkip.amazonaws.com/ http://whatismyip.akamai.com/ dig +short myip.opendns.com @resolver1.opendns.com
- hk1337 6y agoBoth good options but neither does IPv6 AFAIK. There used to be one at ifconfig.dev but I don’t know what happened to it
- daper 6y agoIPv6: curl http://ipv6.whatismyip.akamai.com http://ipv6.whatismyip.akamai.com curl http://ipv6.whatismyip.akamai.com/advanced http://ipv6.whatismyip.akamai.com/advanced IPv4: curl http://whatismyip.akamai.com http://whatismyip.akamai.com curl http://whatismyip.akamai.com/advanced http://whatismyip.akamai.com/advanced Both hosts are distributed around the world using the Akamai platform and should be fast for everyone.
- deleted 6y ago[deleted]
- Snawoot 6y agoI had some auto-tests for VPN app which were relying on similar web-service to check own IP address. One day service become unavailable and autotests got broken. IIRC it was (https://canihazip.com/s https://canihazip.com/s) I decided to solve this task in a fast and reliable fashion, so I made a tool which discovers own IP address using major public STUN servers: https://github.com/Snawoot/myip https://github.com/Snawoot/myip Program issues parallel queries to public STUN servers to determine public IP address and returns result as soon as quorum of matching responses reached. Works fast and reliable, especially compared to services requiring HTTPS: user@dt1:~> time curl https://api.ipify.org 45.152.165.44 real 0m2,515s user 0m0,030s sys 0m0,019s user@dt1:~> time curl ifconfig.co/ 45.152.165.44 real 0m0,131s user 0m0,011s sys 0m0,008s user@dt1:~> time myip 45.152.165.44 real 0m0,084s user 0m0,012s sys 0m0,012s
- ChrisArchitect 6y agoSee also ifconfig.io https://news.ycombinator.com/item?id=17168415 https://news.ycombinator.com/item?id=17168415 ifconfig.in https://news.ycombinator.com/item?id=4070133 https://news.ycombinator.com/item?id=4070133 ifconfig.me https://news.ycombinator.com/item?id=6429921 https://news.ycombinator.com/item?id=6429921 ipinfo.io https://news.ycombinator.com/item?id=5604476 https://news.ycombinator.com/item?id=5604476
- ChrisArchitect 6y agohandy thing yeah - I used this like 6 years ago to write some quick bash scripts that would grab dynamic IP changes and send them to cloudflare to update a DNS record and create our own dynamic DNS service!
- iso8859-1 6y agoThere are a billion hacker-friendly ways to do this: https://unix.stackexchange.com/q/22615/14305 https://unix.stackexchange.com/q/22615/14305
- steveharman 6y agoVery sad to say, there is a massive hole in its upkeep with recent events. In EU? true Region England
- tgsovlerkhgsel 6y agoI'm happy with https://www.ipify.org/ https://www.ipify.org/ - supports plaintext and JSON, v4 or v6, etc. via changes to the URL, so it works without having to set custom headers or telling your client to use one or the other.
- rnhmjoj 6y agoI wonder how much more it will take before the answer to "What is my IP address?" will simply be "Look in the settings" or "Just type ip addr in the terminal". We are so used to NAT that we don't realize how crazy it is that you essentially have to ask a stranger what's your address. It's really difficult to explain this to someone with no networking knowledge. Nothing else works this way: phone numbers, emails or postal addresses.
- knorker 6y agoPhone numbers do work that way.
- teawrecks 6y agoAre you referring to country code prefixes? Their point is that you can always give your number to anyone and they can directly use it to contact you. It's never unclear what number to give someone so they can reach you. Yeah calls have to be routed, but routes are implicit, not something you have to worry about as src or dest.
- rchard2scout 6y agoNo, your own phone number. Say you're at home, you have a landline, and you don't know what your own phone number is. How do you get it? You call someone with caller ID, and ask them to tell you what number you called from.
- tomcooks 6y agoJust duck it https//ddg.gg?q=my+ip
- spiritplumber 6y agohttp://f3.to/ip/ http://f3.to/ip/ https://f3.to/ip/ https://f3.to/ip/ in case you just want to import a string. No headers either. (I'm lazy, so this is what I use to get an external IP for my robots)
- mrlonglong 6y agoIt incorrectly reports the UK is in the EU!
- arikaun 6y agoI run eth0.me - a similar service. This might be the IP lookup service with the shortest URL, which is the reason why I run it. Some anecdotes: -At the moment the service has 10 GiB of traffic/day. In February, there were 295 476 879 requests. -Because the service returns only the IP address and nothing else, the requests are larger than the replies. -At some point a russian ISP began querying eth0.me from (apparently) all of their eyeball routers. Thousands of devices from their address space would query this service every second, which resulted in many Terabytes of traffic monthly. I decided to block their address space. This service was run by somebody else up until a few years ago. It became more and more unreliable and went offline. At some point I noticed that the domain had expired. I decided to buy it and run it myself.
- tryauuum 6y agoneat, thank you for this service
- kmanlives 6y agoI have a similar domain with a 9 character URL that I have been running (wow - I had to look it up!) for 16 years for my own use and for my clients. I have some ddns clients that use it to update their DNS records when their IP changes. I won't be advertising it here on HN any time soon, though, since it would probably fall over from the traffic. :)
- Gravyness 6y agoand this is why no one will use this substantially EVER: it's down already. Error 1020 - Access denied What happened? This website is using a security service to protect itself from online attacks.
- clusmore 6y agohttps://httpstat.us/ https://httpstat.us/ and https://readme.localtest.me/ https://readme.localtest.me/ are similarly useful, trivially simple websites that are hacker-friendly.
- jasonkester 6y agoI miss being able to type “IP” into google and have it just tell you your IP address above the first result. Now, all you get is a bunch of spammy sites that block you with a captcha then fill the page with ads. Hopefully his thing rises to the top of the results.
- uberswe 6y agoI made something similar but simpler which just returns the IP address. It also supports formats like json https://ipcheck.fun/ https://ipcheck.fun/
- billyruffian 6y ago> Country: United Kingdom > In EU?: true How very 2019.
- easybobby 6y agoI was just exploring this the other day. There are so so many ... http://lumtest.com/myip http://lumtest.com/myip http://lumtest.com/myip.json http://lumtest.com/myip.json http://ip.oxylabs.io http://ip.oxylabs.io http://ip-api.com http://ip-api.com http://api.ipify.org http://api.ipify.org http://ipinfo.io http://ipinfo.io http://icanhazip.com http://icanhazip.com http://ipaddressm.com http://ipaddressm.com https://api.myip.com https://api.myip.com http://httpbin.org/ip http://httpbin.org/ip http://bot.whatismyipaddress.com http://bot.whatismyipaddress.com https://ipapi.co/json https://ipapi.co/json http://ifconfig.io http://ifconfig.io http://ifconfig.pro http://ifconfig.pro http://ipfinfo.fun http://ipfinfo.fun http://checkip.amazonaws.com http://checkip.amazonaws.com http://eth0.me http://eth0.me http://ident.me http://ident.me http://ipaddress.sh http://ipaddress.sh http://ipfree.info http://ipfree.info https://iphorse.com/json https://iphorse.com/json http://myexternalip.com/json http://myexternalip.com/json http://wgetip.com http://wgetip.com http://ip.jsontest.com http://ip.jsontest.com http://thisip.com http://thisip.com http://l2.io/ip http://l2.io/ip https://wtfismyip.com/json https://wtfismyip.com/json http://ipecho.net/plain http://ipecho.net/plain http://ipgrab.io http://ipgrab.io http://whatismyip.akamai.com http://whatismyip.akamai.com http://curlmyip.net http://curlmyip.net http://myip.ipip.net http://myip.ipip.net http://checkip.dyndns.com http://checkip.dyndns.com http://ip.anysrc.net http://ip.anysrc.net https://ip.seeip.org https://ip.seeip.org http://ipcalf.com http://ipcalf.com I guess you can count on the proxy networks, the big companies, and the aged ones. Otherwise take your pick based on what's memorable or short.