2

I have access to a router. I want to know its internet IP address through its ISP. I thought about using ifconfig.me but it won't let me.

#copy http://ifconfig.me/ip flash:ip.txt
Destination filename [ip.txt]? 
Accessing http://ifconfig.me/ip...
%Error opening http://ifconfig.me/ip (I/O error)

I think I am very close. What am I missing?

  • Actually that's kind of a neat idea... but are you sure the router a) has Internet access at all and if so b) has DNS configured so it can actually get to ifconfig.me ? – Jeremy Gibbons Aug 12 '16 at 19:37
  • Yes, it has internet access. Can resolve ifconfig.me and can telnet to ifconfig.me port 80. I feel that only specific URL works. When I try wget ifconfig.me/ip. The wget session does not seem to terminate. Although it did got the IP in the file ip. – some user Aug 12 '16 at 19:38
  • Have you tried with any alternatives to ifconfig.me ? I've seen that site take up to 15 seconds to respond, so maybe you're just hitting a timeout... – Jeremy Gibbons Aug 12 '16 at 20:03
  • Good ideas! Many "what's my ip" site provides rich HTML response which is too much for IOS. But I found ifconfig.im which works (I think that might be what I used before too, I just forgot about it) – some user Aug 12 '16 at 20:27
  • Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer. – Ron Maupin Aug 7 '17 at 20:04
2

Very simple method:

more http://ifconfig.me/ip/

or if you don't have DNS lookup configured:

more http://153.121.72.212/ip/

  • Link-only answers are very poor, and they are highly discouraged. Links can go bad over time, and this site is meant as an archive. You need to include the relevant information from the links in your answer, using the quote feature (") for any direct quotes, and provide the links for proper attribution. Product or resource recommendations are explicitly off-topic, too. – Ron Maupin Nov 9 '16 at 15:26
  • I am now getting an error %Error opening http://153.121.72.212/ip/ (Permission denied) – some user Jan 18 '18 at 23:46
1

Using ifconfig.im works:

#telnet ifconfig.im 80
Translating "ifconfig.im"...domain server (8.8.8.8)
Trying ifconfig.im (178.79.178.153, 80)... Open
GET // HTTP/1.1
Host: ifconfig.im

HTTP/1.1 200 OK
(my IP address follows)
  • Your business is getting a private IP address from your ISP? Normally ISPs reserve the public IP addresses for business customers because they pay more than residential customers, and give any private IP addresses to residential customers. – Ron Maupin Aug 12 '16 at 22:09
  • With IPv4 address running out. ISPs are starting to give out private IPs or IPs that appears to be public but goes through Carrier Grade NAT. Also, AFAIK, all wireless carriers assign private IPs. – some user Aug 14 '16 at 16:34
  • ISPs are starting to use CGN for residential customers, but not business customers. – Ron Maupin Aug 14 '16 at 21:41
1

I stumbled across another option.

From the cisco IOS cli enter either of these two commands....

telent telnetmyip.com (can also access this via HTTP (80)

ssh sshmyip.com

Each one of these commands will return a tiny, easy to read, JSON formatted response with your public IP address info (IPv6 or IPv4)

1841#telnet telnetmyip.com Translating "telnetmyip.com"...domain server (172.25.1.200) [OK] Trying telnetmyip.com (18.217.148.211)... Open {

"comment": "## Your IP Address is 24.129.199.65 (58050) ##",

"family": "ipv4",

"ip": "24.129.199.65",

"port": "58050",

"protocol": "telnet",

"version": "v1.0.0",

"website": "https://github.com/packetsar/checkmyip"

} [Connection to telnetmyip.com closed by foreign host]

discovered this at packetpushers.net http://packetpushers.net/telnetmyip/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.