10

I have an ISP that serves semi-permanent IPv4 addresses. They can't promise fixed IP addresses, but unexpected changes are quite rare.

This begs me to ask however: what would be the easiest/most reliable way to track my home IP address so I can access my (Windows 7) home server even in the case of an address change?

Please note: for reasons that I don't want to go in to, I'd like to avoid using any "dynamic DNS" type services. Instead I'd prefer some way to perhaps have the home server leave an occasional/triggered "address stamp" on a remote, off-site server (by SSH, HTTP POST or similar, preferably over an encrypted connection).

oKtosiTe
  • 9,776

9 Answers9

18

The oldest and probably most reliable way to bind a dynamic (or any kind) of IP to a domain name is DynDNS. You have clients for almost any operating system, and once it's set up, it will run for years without you noticing anything.

Julien Vehent
  • 311
  • 1
  • 6
7

You might be able to schedule your client machine (Windows 7?) to ftp or ssh to your server using a fake username and password every hour. If you use a unique username, you can track it in your server log files.

I have a Linux ssh server. The /var/log/auth.log file shows entries like this for failed login attempts:

Feb 11 14:51:27 hostname sshd[3864]: Failed password for invalid user alias from xxx.xxx.xxx.xxx port 28708 ssh2

Which shows the username of the attempted login and the IP address.

If your Windows 7 system got stolen, there is no danger of them getting the password for your server since your using fake credentials. The failed login attempt leaves just enough information on the server for you to be able to track your client system (unique username and the IP address where it came from).

You can use the Windows Scheduler but I would personally use the "at" command since most people don't know about it.

oKtosiTe
  • 9,776
James T
  • 10,351
  • 4
  • 30
  • 31
6

Interesting question. Since you wish to avoid DNS services, I guess it would be fairly easy to knock up a script/batch file to check the current IP address and then to send a note of it to a foreign server via ssh/scp/rsync when it changes.

You can get your WAN IP address returned to you thus:

wget -q -O - checkip.dyndns.org | sed -e 's/[^[:digit:]|.]//g'

It would be easy to have this end up in a variable or file and then you can check for changes and trigger a report as necessary.

This has already been covered elsewhere so if you don't want to reinvent the wheel, have a look here:

http://ubuntuforums.org/archive/index.php/t-526176.html

Edit: Darn, I see you just added that you are using Windows!!!

Edit 2: Much as I hate just linking - there is a DOS/cmd-based solution to the problem here that uses DOS versions of curl and blat (to send an email):

http://www.answerbag.com/q_view/1988422

oKtosiTe
  • 9,776
Linker3000
  • 28,240
5

An interesting solution: if you use a Gmail account, you can leave it open in your home computer, and it will automatically logs you ip address every few hours.

You can check your account activity, including ip addresses, scrolling all the way down in your gmail inbox.

bbonamin
  • 887
2

You can use the dyndns service without using the hostname, if that's your concern. Since your IP is "semi-permanent", I'm assuming you just know it most of the them. On those rare occasions that it changes, just log in to the dyndns site to check your account and it will tell you the new IP address. No hostname required.

When it comes down to it, an IP address is just a number. There's nothing built into the system that will allow you to know about IP changes unless you rely on some third party service somewhere outside of your own network to record those changes. The dynamic dns services (and there are more options than just dyndns.org) are the established, mature, and free means to accomplish this. If you don't want to use the domain name that goes with them, you don't have to (though it the name will still exist and work if you need it).

Joel Coehoorn
  • 28,637
2

http://www.gearboxcomputers.com/products/ip-watcher/ looks like what you are looking for, even though it's not freeware.

LawrenceC
  • 75,182
2

DHCP usually has a hook that can be used to call a script whenever state changes. You just need to script it to update something on your server on the other network.

What that is is up to you as you don't seem to be interested in the standard DNS solution. (You may be able to point a DNS update script at one of your servers. Sending an email on IP address change might be sufficient for your case. Copying a file or contacting a server or port on the other server is another option.

BillThor
  • 11,345
  • 2
  • 28
  • 25
1

https://secure.logmein.com/ - Any machine you connect to their service (which is encrypted) you can go to the properties of that machine on their site and find it's most recent broadcast address.

Also gives you a remote desktop tool, should you need it.

0

if you go to: http://www.ipchicken.com/ against "Name Address:" there should be a long string - you can use that string as a host name to connect to your site.

Just save this string somewhere

jet
  • 2,733