Figure out dynamic WAN IP Address remotely and...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Guest
Hello,

I have a dynamic IP address assigned to my Netgear Router. Behind the router I have a Win 2000 box and a Linux Box. I have done numerous searches and have found a few things:
-there are utilities that will post your address to a web/ftp server (not ideal since I don't want the world to know what my IP address is)
-you can schedule a job (in *nix) through cron (which I'm not very familiar with)
Some of the snippets of commands that I have found to do this are:

#I believe this one sends my local IP address
ifconfig eth0 | grep 'inet addr' | awk -F:'{print $2}'|mail -s address your@email

#This one begins to look at the route and grabs the first hop (I think?)
route | grep default | awk '{print $2}'

I would like help constructing a command that would simply email my WAN (router) IP address to an account every hour or so.

Also, if there is a better way to achieve the same results, please inform me. Possibly a way to do this through my Netgear FR314? I am ultimately looking for a way to find my current IP address from a remote location (preferably via email if it changes) either through a Win 2000 or Linux solution.

In addition, I am looking for the best solution to gain remote access to both of my machines from different platforms. I may need to gain access to either box from a Linux or Windows environment.

Any help is greatly appreciated. Thank you for your time.
 
All the commands you mentioned unfortunately won't accomplish what you're looking for. The only way I can think of to possibly do it would be through the traceroute command. I'm not home right now so I can't try it out on my DSL. You might want to post this question over at <A HREF="http://www.dslreports.com" target="_new">http://www.dslreports.com</A> in the most appropriate forum. The posters over there are extremely knowledgeable in this sort of arena. Good luck.

<i>It's always the one thing you never suspected.</i>
 
im assuming you have either dsl or cable internet and want to know how to access your machines remotely. heres the deal: as long as your router is always on it will never lose its ip address unless you isp intentionally changes it or you lose power for a prolonged period of time. the reason for this is that your ISP uses a DHCP setup to issue its ip's. As you probably know, this is done when your pc boots up and sends a broadcast to the ISP server requesting an IP. The DHCP server issues an IP. The catch is that it issues a 'lease' on the IP. thats why its called a dynamic IP. its not permanent. generally, these lease periods are around seven days long. at the half way mark (3-4 days) the pc (or router) sends out a renew signal to the server. the server then issues a new lease for the same IP for another seven days......you lose your IP in these circumstances if you fail to send the renew signal (pc or router is off for several days), or you send the 'release' signal. the release signal is sent when the pc is shut down. But, because your router is always on, that signal is never sent....

I have a linksys router and cable modem and ahve had the same IP for over a year on a 'dynamic' DHCP system.

As far as a good way to access you pc's remotely, nothing beats a virtual private network. secure connection, complete access to network shares, etc.

ignore everything i say
 
Can't ya just go to the router setup or status interface after its connected and get the Wan IP addr assigned...

With the LinkSys Cable/DSL router/switch ya just use the browser admin status interface and get everything after it connects. At least I think thats my WAN...

Gonna find out real soon tryin to fire up VPM...

<i>Out of my mind. Be back in five minutes...</i>