• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 470
  • Last Modified:

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
0
fvg
Asked:
fvg
  • 5
  • 3
  • 2
  • +4
1 Solution
 
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
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
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
 
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

Featured Post

SMB Security Just Got a Layer Stronger

WatchGuard acquires Percipient Networks to extend protection to the DNS layer, further increasing the value of Total Security Suite.  Learn more about what this means for you and how you can improve your security with WatchGuard today!

  • 5
  • 3
  • 2
  • +4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now