Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Command Prompt - Command for external IP

ipconfig (Windows) or ifconfig (Unix) only seems to show the IP address for the local area networks. Just wondering if there's any way to determine the external (remote) IP address for the machine in the command line? I know there's tons of sites like What's My IP that show the remote IP address.

share|improve this question

marked as duplicate by Hennes, ChrisF, HackToHell, BBlake, Synetech Nov 1 '12 at 13:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

Please check some solutions given [A similar old question][1] [1]:… – spexy Nov 1 '12 at 7:10
Thanks @spexygeek, i could find that one in the list of related questions so i decided to give it a go. – Jay Nov 1 '12 at 7:47
up vote 2 down vote accepted

If you are at home behind a typical ADSL modem then this is your situation:

enter image description here

IP1 through IP5 are the IP numbers in use.

IP5 on the outside of your modem is the IP you use to access the internet. This is the IP seen by the rest of the world.

If you are behind one of the PCs and use ifconfig or Ipconfig then you are looking at the internal network and you will see one of the internally assigned IPs (usually 192.168/24).

If you want to see what IP the rest of the world sees you will have to log into the ADSL router and issue the ipconfig command on that. How you do this depends on your router. E.g. if it runs tomatoe you can just ssh into it and use ifconfig. For other firmwares you might need to access the modems webpage and find the rest setting.

share|improve this answer
+1 for the useful ascii-fied image – invert Nov 1 '12 at 7:22
Heh, Tried to post ASCII, but the < > in the image got in the way. Tried Pre tags. Failed. Solved it in an very ugly way (the image). – Hennes Nov 1 '12 at 7:25
I see! So as i am on office net right now, the IP address displayed by WhatsMyIP is the address of the router? Not my PC – Jay Nov 1 '12 at 7:46
Home office: Yes, most likely. At work: ditto. Mind you, this is no guarantee. I did put 'most' in 'most ADSL providers'. There are exceptions, but usually you have to pay your provider a lot more to get a nice set of IP numbers so you can hook things up to the internet without the kludge called NAT. – Hennes Nov 1 '12 at 7:54

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