Get HomeSeer Now!

CREVIER
HomeSite Map
Categories
Pages
-
-
Scott Crevier
scott@crevier.org
-
IP Address Redirection

Your IP Address: 38.103.63.18
Your Host Name: 38.103.63.18

Introduction

First of all, the above table is just there for the heck of it. It is not necessarily part of this service. This service is handy if you need to link to a web server running on your home PC, especially if your internet connection uses a dynamic IP address.

The instructions here are customized for users of HomeSeer. If you're not a HomeSeer user, well, you should be, but if not, you can probably adjust the instructions to meet your needs.

How It Works

You first log your IP address on this site by visiting a custom URL. You can do that manually by entering the URL in your browser, or better yet, create an event in HomeSeer, and schedule that event to run periodically throughout the day (or right after you establish an internet connection). This will insure that the logged IP address always reflects the current IP address of your PC.

Next, in your browser, visit another custom URL (which you should bookmark or add to your favorites), and this will automatically redirect you to the web server on your PC. This redirection is always based on the last logged IP address for your user id. So just be sure to log your IP address (as described above) as often as you need to insure that it is always current.

The Cost

This service is free to HomeSeer users. For non-HomeSeer users, well, I suppose you can use it for free too, just make sure you feel guilty when you do. :)

The Details

  1. First, select a user name. To keep the setup simple, I allow you to select any user name you want (letters and numbers and underscores only, max length of 64) and I don't require any passwords or logging in, nor do I check to see if the user id is already in use. So be sure to pick something that you know will be unique. For example, 'scott' would be a bad user id, but 'scott2783x10' is a good example of a user id that no one else will probably use.

    (NOTE: If two people do happen to use the same user id, it won't damage anything. But you will find that when you try to visit your web page, you may go to the other guy's page instead, and vice versa. If that happens, just pick a different, more unique user id.)

  2. Now, log your IP address. To to this, simply visit the following URL:

    http://www.x10.crevier.org/ip/logip.cgi?user=your_userid_here

    You can do this in your browser, but it's probably best if you create an event in HomeSeer, and have that event log your IP address for you. You can then schedule this event to run hourly or maybe right after you establish an internet connection; it's up to you. Just run that event as often as you need to make sure your logged IP address is always current. If you're like me, you like to see examples. So check out the following screen shots:

            HomeSeer event screen shots

    If you're familiar with HomeSeer's 'GetURL' function, you can use that in a script with syntax like this:

    hs.GetURL("www.x10.crevier.org","/ip/logip.cgi?user=your_userid_here",0,80)

    Here is a script that you can download and run yourself. It logs your IP address here, and it adds your IP address and hostname to your HomeSeer log.

            logip.txt 2KB

  3. Once your IP address is logged that's it. Now you can visit your custom URL any time, and you will be automatically redirected to your web server. The custom URL to visit your page is as follows:

    http://www.x10.crevier.org/ip/goip.cgi?indicate_options_here

    Here is a list of possible options. These should be separated in the URL with the ampersand (&) character:

    user=your_userid_here (required)
    port=portnum (optional)
    auth=authentication_info (optional)
    pcol=protocol (optional)

    If you do not indicate a port number, the default port will be used, which is usually port 80. If you have defined your web server to run on a different port, then you'll need to use the 'portnum' option. If you want to indicate a user id and password for authentication (i.e. for HomeSeer's web interface), then use the 'auth' option.

    If you do not indicate a protocol, the 'http' protocol will be used. If you need to make a secure connection, you should use:

    pcol=https

    Here's an example using all options, so that you can see how the syntax works. Be sure to separate options with the ampersand (&) character:

    http://www.x10.crevier.org/ip/goip.cgi?user=your_userid_here&port=portnum&auth=guest:guest&pcol=https

    As eluded to above, you should add this custom URL to your bookmarks or your favorites so that you can go there any time, without typing the URL.

  4. If you would like to view the last logged IP address for your userid, visit the following address:

    http://www.x10.crevier.org/ip/viewip.cgi?user=your_userid_here

    This is handy if your machine at home is logging your IP address, and you want to check its status periodically from work. Just visit the above URL from work, and it will give you all the data from the last time your userid logged an IP address.

    NOTE: Viewing your IP address using the above URL does not log anything. It only views data that's already there.

Thanks!

19-Feb-2002: Thanks to Patrick Deutsch for suggesting the 'auth' option.
12-Jul-2003: Thanks to Mark Difazzio for suggesting the 'pcol' option.

Suggestions

I welcome any suggestions or comments that you may have, especially those regarding the clarity of the instructions above. Also, if your IP address situation is unique or requires some special handling, let me know, perhaps I can help. I'm partial to fellow HomeSeer users. :)

Scott


Get HomeSeer Now! Copyright © 1997-2008 Scott M. Crevier
Sat 12-Jul-2003
www.x10.crevier.org
-Click here for a $15 Gift Certificate!
Scott Crevier's Home Automation
-