Retrieve Wan Address

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
fvgAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Pete LongTechnical ConsultantCommented:
0
Pete LongTechnical ConsultantCommented:
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
sunray_2003Commented:
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
What were the top attacks of Q1 2018?

The Threat Lab team analyzes data from WatchGuard’s Firebox Feed, internal and partner threat intelligence, and a research honeynet, to provide insightful analysis about the top threats on the Internet. Check out our Q1 2018 report for smart, practical security advice today!

Pete LongTechnical ConsultantCommented:
afternoon Ash :0)

that will only return the local IP address mate, the poster need his WAN address :)
0
sunray_2003Commented:
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
Pete LongTechnical ConsultantCommented:
sunray_2003,
:)
Pete
0
sunray_2003Commented:
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
LucFEMEA Server EngineerCommented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
UNS-TechCommented:
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
kapesCommented:
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
thribhuCommented:
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
UNS-TechCommented:
isn't a reserved public the same as 'sticky'

;o)


0
fvgAuthor Commented:
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
LucFEMEA Server EngineerCommented:
Glad to help :)

LucF
0
Pete LongTechnical ConsultantCommented:
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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Networking

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.