5 ms·
Somewhat related. https://www.google.com/search?q=ip https://www.google.com/search?q=ip
by codexon 13y ago
Somewhat related.
https://www.google.com/search?q=ip https://www.google.com/search?q=ip
- privong 13y agoAnd, https://duckduckgo.com/?q=ip https://duckduckgo.com/?q=ip
- jlgaddis 13y agoSimilar, but plain text and, thus, easier to parse, if necessary, e.g.: $ IP=`curl https://icanhazip.com/` $ echo $IP
- spoiler 13y agoThis is magnificent! I wish I knew about that before!
- nadaviv 13y agoThere's also ifconfig.me, who returns either an HTML version or a plaintext version depending on the user-agent, so `curl ifconfig.me` returns just the plain IP. There's also a list of other URLs on the homepage (for the host, user agent and a bunch of other stuff).
- samuelkadolph 13y agoI've found ifconfig.me to be excruciatingly when I actually need it. Like takes 10-30 seconds for a response just to get my IP. Sucks that someone got the vanity domain and put a shitty server behind it.
- voltagex_ 13y agoIs there a reason you can't retrieve it via uPNP or similar?
- jaryd 13y agosomewhat easier to remember: curl ifconfig.me
- amjd 13y agoIf you want JSON output, then there is httpbin. curl https://httpbin.org/ip returns { "origin" : "192.168.0.1" } It also supports getting the user agent [0] and headers [1], among other things. [0] https://httpbin.org/user-agent https://httpbin.org/user-agent [1] https://httpbin.org/headers https://httpbin.org/headers
- lloeki 13y agoFWIW: $ curl -4 https://icanhazip.com/ 88.… $ curl -6 https://icanhazip.com/ 2001:470:… (for me it's worth a yay)
- mcosta 13y agocurl: (7) Failed to connect to 2606:f200:0:7:bad:f00d:d00d:2: Network is unreachable
- alexkus 13y agoDepending on what you use the IP for, asking a third party for your IP address could be an interesting attack vector for a MitM attack. e.g. you need your IP to tell a remote server to send you something. You connect to the IP address service to ask for your IP, it should return x.x.x.x but it returns y.y.y.y instead. Any connections to any port on IP y.y.y.y get forwarded to a similar port on IP x.x.x.x meanwhile the MitM takes a copy of all of the data going back and forth. It's not foolproof, and there are a myriad of ways to defend against it, but it's definitely a reason why I wouldn't trust any third party service (even DDG/Google) to get my IP address.
- jhgg 13y agoI've used http://ip.jh.gg http://ip.jh.gg && http://ua.jh.gg http://ua.jh.gg for ip/user agent needs.