Link to home
Start Free TrialLog in
Avatar of jeremy092288
jeremy092288

asked on

WAN IP from Command Prompt

OK, so I have comcast high speed at home, and I have set-up RDP. But comcast like to change my ip without telling me. What I want to do is create a batch file to run at start-up that gets my WAN IP and uploads it in a text file to an FTP site. I know there is no-ip.org and stuff but I have enough services as it is. I can't seem to figure out how to get the WAN IP from a command prompt. I can figure out how to upload it to an FTP site (I think) but is it even possible to get WAN IP from CMD?

Thanks in advance
Jeremy
ASKER CERTIFIED SOLUTION
Avatar of merowinger
merowinger
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jeremy092288
jeremy092288

ASKER

Ip config /all doesn't even return the WAN IP.... I don't want any more services running on my pc. Anyone know how to get the WAN IP from Command Prompt?
Ignore the first person, your computer has no idea what it's WAN ip is because it's behind a router and all of it's traffic is nated. There are webpages like www.whatismyip.com that will show you in a browser what your external IP is.  it would be tough to integrate that into a command though, maybe refresh the page and save it. and upload the page to your ftp site. OR
One thing you might be able to do, if you can send an email from the machine every hour, you can check the message header for the ip address.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
http://www.whatismyip.org/

has simply text, so let's change this question around..... how can I download an html file from a command prompt.
you can try lynx for win32 http://www.fdisk.com/doslynx/lynxport.htm
I don't think you can simply telnet to port 80 on whatismyip.org and get your ip.

What is this determination to use command line anyway?  seems like email would be the easiest way.
Chuck,

The DOS option is usually a simple way to handle these thing in an automated fashion.
Low resources on the system, no services needed, and easy to set up a batch file
to run on a schedule.

The email option I outlined above is easy, but requires a few things:

1. You have Outlook or some other email software that you will not mind leaving
running on your home machine, and it can handle forwarding and rules.

2. A public email service like Hotmail to receive and view the information.

I'm not sure if you can view the header information (not sure if I am using the
correct term) in Outlook or another NON-WEB based email client? If so I would
like to learn about that myself! :o)
Chuck,

DOS Commandline is fast and low on system resources. It is also very easy for
the intermediate user to set up a batch file and schedule.

The email idea I outline above is easy, but relies on two things.
1. You have an email client that can deal with rules and automatic forwarding,
and you don;t mind leaving that email client up and running on your machine
at home.
2. You are a hotmail user (or possibly another web based email user)

I'm not sure you could recover the email header information (if I am using the
correct term), from an email that comes in through outlook? If so I would be interested
in learning that as well! :o)
Hey.

MyWanIp 2.0
http://www.download.com/3000-2155_4-10429280.html

Also has the option to load on startup and to copy your WAN IP to the clipboard.