How do I automatically post my changing IP address?
December 15, 2003 6:39 AM   Subscribe

I need to find a way to automatically post my IP address somewhere. The address changes periodically and I have to consistently reach services on a particular machine. The trouble is that the machine is behind a broadband router, and it's the router's address that's I need to publish. Anyone know of a tool or trick for this? I'm running WinXP Pro.
posted by Songdog to Computers & Internet (15 answers total)
 
What router are you using? Some can update an EveryDns or DynDns account.
posted by signal at 6:47 AM on December 15, 2003


You probably want to use a service like dyndns.org. You'll be able to pick a url like songdog.dynalias.org and by running a small app on a computer behind the router you'll be able to consistently have your url pointing to the proper IP address.

Do you actually need the ip address? You could always run apache on a desktop behind the router and through some PHP-fu be able to update a field on a remote machine.
posted by bshort at 6:48 AM on December 15, 2003


There was a thread on this theme late last week. Try dyndns.com - it's a free service that allows you to access your dynamic IP address using a static 'label'. Even if your router can't update the address by itself, there is software (listed on the dyndns.com website) that can do this for you.
posted by stonerose at 6:48 AM on December 15, 2003


Response by poster: My router is one of the popular LinkSys models. I've seen software that will post my machine's address in a template page via FTP, but of course my machine doesn't know the public address, only the router knows. I've got the router forwarding certain ports to the machine of interest. I'll see what dyndns can do. I do actually need the IP because I need to access non-web services on the machine.

stonerose - I'm sorry if I'm repeating a question. I didn't see a way to search them. Am I missing something (other than Google, which won't have the most recent stuff indexed yet)?
posted by Songdog at 6:58 AM on December 15, 2003


If you felt like jumping through a hoop or two, you could get a dynamic DNS entry like blahblahblah.no-ip.com which will be updated automatically by a service on your machine.

Then just doing a lookup on blahblahblah.no-ip.com will yield your routers current or last IP
posted by cell at 7:03 AM on December 15, 2003


Response by poster: Ah ... this list of tools from dyndns offers some possibilities. It looks like they can determine the remote IP as well as the local one. I was not aware that the remote IP could be determined by a machine behind the router. Perhaps some trickery with a ping or trace?
posted by Songdog at 7:06 AM on December 15, 2003


I was not aware that the remote IP could be determined by a machine behind the router.

It's easy. You just ask a server on the Internet "what is my IP address?" The server can only see the router's address, obviously -- that's what NAT routers are all about. I have a script on my Web site that does this. It's ASP but it would be just as trivial in PHP or Perl or whatever. The script in its entirety reads:

Response.ContentType = "text/plain"
Response.Write(Request.ServerVariables("REMOTE_ADDR"))

It's trivial for a client to make such a request, assuming it knows the URL where such a script exists, and if you're using a dynamic DNS client, it knows. Actually, the dynamic DNS client is making a Web request anyway, so it can just tell the dynamic DNS service "use my current IP address, whatever that is" and not have to make two separate requests.
posted by kindall at 7:13 AM on December 15, 2003


Response by poster: Oh, of course. I honestly hadn't thought of doing that! Thank you all for your suggestions. I've downloaded one of tools suggested by dyndns and will be giving it a try.
posted by Songdog at 7:28 AM on December 15, 2003


There's also a public service that will tell you what your externally-visible IP address is, cleverly named whatismyip.com. Its output is easy to parse and the format has not changed in years - not as long as I've used it, anyway.
posted by Mars Saxman at 8:10 AM on December 15, 2003


I like www.no-ip.com they offer a free service that is by far enough for most.
posted by dirtylittlemonkey at 11:41 AM on December 15, 2003


See also this thread.

No, really.
posted by armoured-ant at 7:35 PM on December 15, 2003


As the instigator of the thread linked above, my recommendation is for no-ip.org, solely because they use their own client software that can collect the external IP of your router and update your x.no-ip.org sub-domain very simply. The total configuration involved was two clicks - one to select the no-ip.org account to update and one to run the client as a service. I tried dyndns first, but the clients are all third-party and either cost or have too much configuration for an idiot like me.
posted by dg at 9:27 PM on December 15, 2003


I use dyndns.org and have my own custom domain. It's great, because I have a couple of development web/database servers hosted in my own apartment for my fledgling company.

It's easy to set up. First, either choose the free service or choose the pay (custom) service. Then download one of the clients. I use DynDNS Updater by Kana Solution on my windows box. There's also updaters for linux, which I'm installing tomorrow because the domain name stopped working when I had my windows box at a LAN party once. :-P

Setup took about thirty minutes the first time I did it (with the free service) and the hardest part was deciding which client to download.
posted by SpecialK at 9:50 PM on December 15, 2003


the linksys routers can update dyndns.org out of the box, just go to the configuration under DDNS
posted by rhyax at 11:11 PM on December 15, 2003


Response by poster: I ended up downloading one of dyndns' recommended clients, and I'm just having it upload a page to a website with the IP address. It doesn't change often, so I only need to look it up when there's a problem. I might set up dynamic DNS at some point, but this is working well for now. Thanks for the help!
posted by Songdog at 5:45 AM on December 18, 2003


« Older Name this SciFi novel   |   How can I get the sound files out of a Playstation... Newer »
This thread is closed to new comments.