Discussion Locked

Get the WAN IP address from the command line?

0 helpful
16 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

This laptop of mine I am working on connected to the Internet through a router that connected to a cable modem with the ISP.

From the Netgear gateway I can see an IP address to connect the device in Remote Management. I wonder if that is the IP address of my router from the outside world, the Internet.

Is there some way I can verify that? I use ipconfig /all but do not see through the router. I remember if my memory serves me right I could see the WAN IP address if my computer connected directly to the modem.

I ask for this because I want to test remote desktop connection over the Internet and I suppose I need the WAN IP address.

16 replies

by mohammad oweis

unfortunately you can't see it in tracert.
first hop will be your router (private IP), second one will be your ISP gateway.

by ic-it

it lists the hops, so depending on how the ISP sets up their modem you may or may not see it.
Of course if you have a router also, you could look at the config page.

by healer

on google.com just now and I couldn't see my WAN IP address in there. I don't know what the first one 10.58.0.1 is.

Tracing route to google.com [66.102.11.99]
over a maximum of 30 hops:

1 9 ms 7 ms 9 ms 10.58.0.1
2 11 ms 8 ms 8 ms sbr5-ge1.gw.optusnet.com.au [198.142.160.153]
3 10 ms 7 ms 8 ms xe-3-1-0.sd32.optus.net.au [119.225.11.253]
4 * * * Request timed out.
5 9 ms 8 ms 9 ms google.sd13.optus.net.au [119.225.36.2]
6 11 ms 8 ms 11 ms 66.249.95.232
7 10 ms 16 ms 17 ms 64.233.174.242
8 10 ms 11 ms 11 ms syd01s01-in-f99.1e100.net [66.102.11.99]

Trace complete.

by mohammad oweis

The IP address 10.58.0.1 is a private IP, supposed to be inside your network (your Netgear router).
But having a 9ms for the first hop, this mean that the device is far from you, if its not your router IP then most probably belong to your ISP.

You will never see your WAN IP here.

by healer

I can't find the IP address 10.58.0.1 anywhere in my network. My LAN gateway is 192.168.0.1.
Also I try to access the gateway using the WAN IP address from within the LAN. It always times out even though I have explicitly allowed for that on the Remote Management. I've also noticed that the WAN IP address so far has never changed even though it is supposed to be dynamic.

by healer

Is it a router at the ISP side?

C:\Program Files\Nmap>nmap -A 10.58.0.1

Starting Nmap 5.21 ( http://nmap.org ) at 2010-02-03 21:46 AUS Eastern Daylight
Time
Nmap scan report for 10.58.0.1
Host is up (0.014s latency).
Not shown: 997 closed ports
PORT STATE SERVICE VERSION
25/tcp filtered smtp
139/tcp filtered netbios-ssn
161/tcp filtered snmp
Warning: OSScan results may be unreliable because we could not find at least 1 o
pen and 1 closed port
Device type: router|switch
Running: Cisco IOS 12.X
OS details: Cisco 2821, 6506, or 7206VXR router (IOS 12.2), Cisco 3750 switch (I
OS 12.2), Cisco Catalyst 2960 or 3600 switch
Network Distance: 1 hop

TRACEROUTE (using port 8080/tcp)
HOP RTT ADDRESS
1 20.00 ms 10.58.0.1

OS and Service detection performed. Please report any incorrect results at http:
//nmap.org/submit/ .
Nmap done: 1 IP address (1 host up) scanned in 10.87 seconds

by mohammad oweis

Maybe your ISP is using some kind of proxy or NATing, and let all his customers use a single public IP, and let you use a private IP between you and him.
Some ISPs do that, but they have to tell there customers about that.
Try to ping 10.58.0.1, if you got a reply, then get nmap program http://nmap.org/dist/nmap-5.21-setup.exe
and run the following command "nmap -A 10.58.0.1" this will give you a description about what is this device.

by mohammad oweis

Yes indeed its a router belong to your ISP.
It seems that your ISP use private IPs to connect all his customers to the internet and let you all go out with one public IP or a small pool of IPs.

So, you will never be able to connect to your Router or your PC from the internet.

by dsnew

Hello this is DS,
If u know how to get the WAN ip address from cmd then please ignore this if u dono then this is a good method upto my knowledge bcz i found this on my own ..

first u must know that any windows or linux doesn't has any program to get the public ip or wan ip so if u want to find wap ip address without any software or visting any ip address is
step :1 --->FInd out ur modem or router IP
|---->to do so enter in to cmd then ipconfig,u will get
IP Address............192.168.1.2
Subnet Mask.........255.255.255.0
Default Gateway....192.168.1.1
like this but the numbers may differ ,so copy or note down Default Gateway(192.168.1.1)

Step:2--->now in cmd..enter as telnet
u will get as

Microsoft telnet> now u enter as shown below o -->open ,and default gateway
Microsoft telnet>o 192.168.1.1
it will show
ADSL Router
Login:
--->so u need to enter ur modem or router login details if u dono it will be @ bottom of the modem...
--->usually it will be Login:admin and password same "admin"
some times id as "admin" password as "pass"
after entering the details,
Login:admin
password:admin
Step:3--->now enter as "wan show"
>wan show
Step:4--->u will get ip address that is ur WAN ip address or ip address given by ISP (public ip)

Note:1:If there is any easy method then please post and this is using command prompt

Note: 2:U can also do this easily by entering the default gateway in browser (192.168.1.1)
it will ask for Login id and password enter it
in the page what u get there will be WAN IP ADDRESS u got it ..:)

Thank you

by rethu

it's not necessary to have both ip address and domain name to get ip details .You can find the ip details with any one either domain name or ip address.Use this site http://www.ip-details.com/ to get ip details.

This discussion is closed to new replies.