Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Retrieve Wan Address

Posted on 2004-11-02
15
Medium Priority
?
465 Views
Last Modified: 2008-01-16
Hello,
On my home computer I have an ADSL connection behind a router to go on the internet. On each systemstart I become a dynamic IP address from my ISP.  Since I often have to make connection from the office to my home computer, I always have to ring home ans ask to verify the Wan Ip.
So, it it possible to retrieve the Wan IP address and store it into a file.
If thats possible, i can (at system start), retrieve the address and send the file automatically to the ftp server on the office.
I'll already have a batch routine to send the file.
What I need now is a batch routine to retrieve the Wan IP address and to store that information in a file.
Could someone help me?
Thanks
Frank
0
Comment
Question by:fvg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
  • +4
15 Comments
 
LVL 57

Expert Comment

by:Pete Long
ID: 12471754
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 12471806
ah you want to script it sorry there is a utility you can use called "CmdNET" to discover your public ip the syntax is CmdNET /p

(how to script it) Your Home IP Address
http://avwebserver.mit.edu/avdb/how_to_find_ip.htm

download
---------------------------------------------------------------
CmdNET is a command line tool capable of retrieving information about your currently assigned local and public/WAN IP address. Furthermore it can display your NICs MAC address. Errorlevel and redirection of output to file is also supported.
http://www.software4win.com/php/browse.php?Submit=Select&Category=80&Page=1
-----------------------------------------------------------------
or here is a VB solution http://cwashington.netreach.net/depo/view.asp?Index=526&XcriptType=vbXcript

0
 
LVL 49

Expert Comment

by:sunray_2003
ID: 12471809
Check this out .
http://www.experts-exchange.com/Operating_Systems/MSDOS/Q_20743821.html#9399250

I am not well versed in batch files but I guess you can understand and implement the same.
you should be able to use that and get the IP address to a text file on your machine and then whatever method you use , you should be get that to your office and then dial in

post back if you need more assistance

SR
0
Plesk WordPress Toolkit

Plesk's WordPress Toolkit allows server administrators, resellers and customers to manage their WordPress instances, enabling a variety of development workflows for WordPress admins of all skill levels, from beginners to pros.

See why 2/3 of Plesk servers use it.

 
LVL 57

Expert Comment

by:Pete Long
ID: 12471813
afternoon Ash :0)

that will only return the local IP address mate, the poster need his WAN address :)
0
 
LVL 49

Expert Comment

by:sunray_2003
ID: 12471824
Good Morning ,Pete..

I thought so. I forgot the point that he is behind router. if he is not then he should be able to use ipconfig /all and get the IP..

0
 
LVL 57

Expert Comment

by:Pete Long
ID: 12471838
sunray_2003,
:)
Pete
0
 
LVL 49

Expert Comment

by:sunray_2003
ID: 12471881
Pete,

I am stepping into the less experienced TA when the big cats are around..LOL !!

I am thinking about this idea

a) I am behind a router. Is there a command that can give me my WAN IP.. If I am not behind a router , i can give ipconfig /all and get it but why cant I get when I behind a router..

b) Technically , why wouldn't be possible to telnet to my router (telnet 192.168.0.1) and then get the WAN IP..
0
 
LVL 32

Accepted Solution

by:
LucF earned 2000 total points
ID: 12471900
Hi fvg,

Maybe a simple idea... why not using a Dynamic DNS like http://www.dyndns.org/services/dyndns/
It's free, very easy to manage and you'll never have to remember your IP address, all you need is your hostname.

Greetings,

LucF
0
 
LVL 1

Expert Comment

by:UNS-Tech
ID: 12472130
hi

remember though, that sometimes ( and periodically ) your ISP changes your IP, unless you request a 'sticky' or a true fixed

hope this helps


0
 
LVL 6

Expert Comment

by:kapes
ID: 12472522
tell me what commands you run on your machine to find out your WAN IP?

if feasible, I will help you write a batch file for that !!
0
 
LVL 4

Expert Comment

by:thribhu
ID: 12472533
u can run a bach file with text saying "ipconfig /all"  at command prompt.

but u have to think of saving this into a file....

Or better, give your system MAC adress to the ISP to bing it to a reserved Public  IP adress if possible......
0
 
LVL 1

Expert Comment

by:UNS-Tech
ID: 12472583
isn't a reserved public the same as 'sticky'

;o)


0
 

Author Comment

by:fvg
ID: 12482645
Thanks everyone for their answers.
First of all the CMDnet comment (PeteLong) is the one I have always used before. But since i'm behind a router it gives no return as public address.
Thanks to LucF for his idee concerning the dynamic dns servers.
It was the first time I've heared from it.
So I done some search and found a small service thats runs quite well under WinXP.
This service called DNSer V1.3.2 is freeware.
On a user intervalvalue it check's the current Wan IP eigther from an Internet server or directly from your Router.
When the address is changed it sends the new IP to a dynamic Dns server.
I had problems doing it with dyndns.org but it works very good with no-ip.com.
So my problem is solved.
Since LucF gives me the original idee I want to give my points to him.
Thanks
Frank

0
 
LVL 32

Expert Comment

by:LucF
ID: 12482685
Glad to help :)

LucF
0
 
LVL 57

Expert Comment

by:Pete Long
ID: 12485148
Glad you are fixed Frank

take a look at no-ip.com I use them for my website www.petenetlive.com they are very good :)
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I am going to show you how to simulate a multi-site Lab environment on a single Hyper-V host. I use this method successfully in my own lab to simulate three fully routed global AD Sites on a Windows 10 Hyper-V host.
Make the most of your online learning experience.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question