0

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.

Jay
  • 1,288

1 Answers1

2

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.

Hennes
  • 65,804
  • 7
  • 115
  • 169