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
Bookmarks