Link to home
Start Free TrialLog in
Avatar of mrdtn
mrdtn

asked on

Obtain router's WAN address (from inside LAN) without having to log into router setup pages:

Hi,

I am using VNC to provide support for someone remotely.  They are behind a LinkSys wireless router.  In order to connect to them, I need to know the WAN address assigned by their DSL provider.  Unfortunately this address is not static (accept for the duration of the DHCP lease / connection).

I can have them log into the router and tell me the WAN address from the router setup screen, however, I would like a simpler method -- perhaps one which I can encapsulate into a small console program I write of even a batch script.  So, does anyone know of a method of getting the router's WAN address in such a manner?  I thought "tracert" would give me that info, but to my surprise, the router's address was nowhere to be seen (unless my eyes were playing tricks on me).

Thanks in advance.
Avatar of inetinet
inetinet

Have the user send you an e-mail, then review the headers to get their WAN address.  Maybe you can program their system to send you an e-mail on a scheduled basis (at/cron)?  Once you get the WAN address, it shouldn't change too often...  not to say it won't at all...

inet²
Or how about Dynamic DNS???
http://www.dyndns.org/

inet²
Avatar of Todos
Mrdtn,

Inetinet is right, simple and nice solution:). Tracert will probably skip the WAN adres, because it only sees the next hop. In this example you will see what i mean. Following info is used:

IP address Inside pc (tracing) :  192.168.1.10
IP adress WAN router inside   :  192.168.1.1
IP address WAN router outside : 10.10.30.34
IP address gateway ISP  : 10.10.30.1

when you will trace to for example microsoft.com you will see the following steps:

192.168.1.1
10.10.30.1
etc
etc

As you see, your outside address of te WAN router is skipped because its not a new logical hop. Thats why youll never see it show up with tracert.

grtz

SOLUTION
Avatar of homeofmike
homeofmike

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Don't think its possible without querying the router since all the above give the PCs address rather than the routers one. Does the router support SNMP?
Avatar of mrdtn

ASKER

Actually, the links above do work.  They rely however on a remote site.  Not sure if SNMP is supported, but my guess is no since this is a router geared for home networks, not managed.  Ideally, I would like something where I could directly query the router from a command line if possible, but if this is not possible, the above links will do.  I haven't tried the Dynamic DNS, but I will before closing this question.  Points will be going 'round before the weekend's out.  Thanks to ALL so far!!
Download the "Downloader" freeware program from:  http://www.iopus.com/downloader.htm
Download direct at: http://www.iopus.com/download/iopus-file-downloader.zip

Write a file called "myip.bat" with the following line, and save it where you "downloader.exe" is:
downloader.exe -download http://www.ipchicken.com myip.txt

then run "myip" - this will save the source of that web site (or pick you favorite) to "myip.txt"

Now you can run the batch file in the task scheduler...

Now you have the IP address on file - then just send it to yourself

inet²
Is there any chance that you could put a Linux box (even an old 486 or something) on the network of the person you are supporting...  all of these things would be so much easier to automate (imho) :-)
inet²
You could load a free program called IP Monster on the remote pc, which can email you every time the IP address changes, informing you of the new IP address.

http://download.com.com/3302-2381-10201372.html 
Thanks, homeofmike!
I just loaded it - works great.
I would award all points to homeofmike.
inet²
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I know that this has been awarded, but, this will work for anybody that needs access to a remote site whose IP address keeps changing.   (Host a web site, mail server, VNC, Remote Desktop, FTP site, etc...)  This works for Windows, Mac, Unix/Linux

1.  Register with WWW.IPUPDATER.COM for free
2.  Install DIRECTUPDATE FOR IPUPDATER for free at http://www.webattack.com/Freeware/network/fwip.shtml

On your side, you just enter their DNS name into VNC such as kreagan.ipupdater.com
On their side, they just run the DIRECTUPDATE program to keep ipupdater.com up to date with the current IP address.
Avatar of mrdtn

ASKER

Thanks All!

homeofmike was first to chime in with a quick and dirty link.  This is what I started using -- putting a special link ion the user's personalized web page so I can have them tell me the address by phone so I can connect.

I do plan on setting up the VNC client in listening mode as pjedmond mentioned.  This will ultimately be the simplest solution.  Anyway, I doubled the points and awarded both.  Thanks again all.  All of your suggestions were good.  I was looking for the least amount of effort, since the remote user is not very familiar with finding their way around Windows.