Results 1 to 5 of 5

Thread: How to auto determine external router address...

  1. #1
    Junior Member
    Join Date
    Jan 2006
    Posts
    2

    How to auto determine external router address...

    Hi,

    I have recently moved into a position that requires a remote connection back to the office router almost nightly. The problem is that the company uses a Verizon DSL PPoE connection and the address changes daily. I'ml ooking for a way to automate a windows script that will open up the browser, connect to the DSL router (Westell) and copy the status page to file and then I can sedn the page to whomever needs the updated address.... I could do this no problem if the router let me telnet in but this one only has http acess as far as I can tell.

    Here is my router info

    Model Number B90-327W15-06
    Software Version VER:03.02.00a
    Software Model 4 Port Gateway
    Description WireSpeed Data Gateway
    Boot Loader VER:03.02.00a
    Configuration 096-900096-00A

    Any help would be appreciated......

  2. #2
    I've kinda have the same problem as you. I have a domain name registered, but a dynamic IP address due to Verizon DSL PPPoE. My WAN IP rarely changes, but when it does, I need to know so I can refresh the DNS entry for it at ZoneEdit.

    There are a couple of ways to find out your WAN IP address. One way, like you said is to connect to your DSL router, and pick it up from the status page. Another way, is to access an external web that shows you your IP address from a PC behind your router, similar to this one ... http://dynamic.zoneedit.com/checkip.html

    What I've done, was write a .NET application that will grab my IP from one of these sources, parse the web page to find my WAN IP, and then automatically post it to ZoneEdit if it changes.

    If you could convince your company to buy a domain name (~$12/yr) you could have ZoneEdit manage it for free allowing you to change the IP address daily. (There are other dynamic IP / domain name managers out there, ZoneEdit is just the one I use.) This way, anyone who needs your company's IP address could instead use your company's domain name, and they would always get to your network. (Well, as long as you maintain it ;-)

    ZoneEdit.com has a FAQ about how to maintain your dynamic IP address in their DNS here ... http://www.zoneedit.com/doc/dynamic.html

    They also point you to free client software that will maintain your DNS entry for you. All you have to do is download and configure them!

  3. #3
    Here's some VB script code to run on a PC inside your router to determine your WAN IP address ... save this to a file with the extention .vbs and double-click to run it.

    Code:
    MsgBox GetIP, vbInformation, "My WAN IP"
    
    '-- The GetIP() function should return your WAN IP address as a string.  
    '-- You can then do what you want with it.  Above, I just display it in
    '-- a message box.
    Function GetIP()
    	Dim xmlHTTP
    	Dim pageText
    	Dim ip
    	
    	'-- Use Microsoft's XMLHTTP object to retrieve web page text	
    	Set xmlHTTP = CreateObject("MSXML2.ServerXMLHTTP.4.0")
    	
    	'-- Request web page
    	xmlHTTP.open "GET", "http://dynamic.zoneedit.com/checkip.html", False		'-- , proxyUser, proxyPassword  '<-- If you have a proxy!
    	xmlHTTP.send
    	
    	'-- Get HTTP response
    	pageText = xmlHTTP.responseText
    
    	'-- Strip out IP address
    	ip = Mid(pageText, 33, InStr(33, pageText, "<br>") - 33)
    	
    	'-- Return IP address to caller 
    	GetIP = ip
    End Function

  4. #4
    Junior Member
    Join Date
    Jan 2006
    Posts
    2
    First of all, thanks for taking the time to respond...and I'm not a very good VB guy so bare with me on this...

    I tried what you have posted but I just receive the following error:

    line 15
    char 57
    expected end of statement
    code 800A0401

    Am I doing something wrong?

  5. #5
    I tested this on my computer, and it worked fine ;-) That's a claim all programmers make!!

    Take a look at the file you created... if it doesn't look exactly like (minus the color coding) the code above, then maybe something got added/dropped in the copy and paste. Specifically, line 15.. the xmlHTTP.open line. Did the end of the statement get returned to the next line? Something like that... programs/scripts are very peticular about whitespace/returns.

Similar Threads

  1. Tweak SBC Yahoo DSL
    By golwalla in forum Broadband Tweaks Help
    Replies: 7
    Last Post: 11-13-04, 01:34 PM
  2. aDSL Connection Problems
    By lordreyiss in forum General Broadband Forum
    Replies: 1
    Last Post: 10-17-04, 11:43 AM
  3. netgear router and bad address errors
    By wgmellon in forum Networking Forum
    Replies: 1
    Last Post: 10-11-02, 12:01 PM
  4. Share @Home IP Address Linksys BEFSR41 Router
    By apokon in forum General Broadband Forum
    Replies: 1
    Last Post: 11-22-00, 03:27 PM
  5. @home network help (p314 router with one ip address)
    By Enkrates in forum General Broadband Forum
    Replies: 2
    Last Post: 10-07-00, 08:55 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •