Dynamic IP Web Server

Starting your web services company on the cheap

You have an idea for the launch of some kind of web services, like selling some product, or you want to take your time to test how to do it. You want it to be interactive with your local computer, but because you're not sure if you'll make money right away, you want to do it, as cheaply as possible. Here's a trick to avoid the need for a fixed IP. You can use your existing dynamic IP with a local web server. I show you how.

Authors

This article written and copyright 2010, by Will Johnson, wjhonson@aol.com, All Rights Reserved.

[Edit]
This article explains how to make a web server functional for serving up pages to remote browsers, even if you do not have a fixed IP address.  To fully utilize this article, you will need to be able to write a computer program.  The programming language does not matter, provided it can execute shell commands (at the Dos prompt), and can read and write files on your local computer.

Having your own local web server, means that you have, in your own home or office, a computer which can serve up web pages to remote browsing users on the internet.  Any person can run a web server.  There are free web servers available to download, and most computers will come with a simple one embedded, you merely have to figure out how to launch it.  One popular web server is Apache, but I believe Windows comes (or at least came) with another one called Personal Web Server or something like that.

When you sign onto the Internet through dial-up, or while you're connected through a DSL or similar continuous connection, your computer is assigned an IP address.  This is a number that looks something like 121.235.72.20  or whatever.  Some DSL connections have a fixed IP number that never changes, but the vast majority of them use dynamic IP numbers that can change from time-to-time (which is why they are called dynamic), and all dial-up connections use dynamic IP numbers.  You can determine your current IP address in Windows by, from the DOS prompt type the command: ipconfig.


[Edit]
You might think your DSL is using a fixed IP address because during one day, or even over several days, the number may not change. However, if you turn your router off and on, chances are, you will be assigned a different IP address from the one you were just using.  Another way to force the IP number to change, would be, at the DOS prompt issue the command: ipconfig/release and when that finishes, issue the command: ipconfig/renew and when that finished issue the command: ipconfig.  Your IP number will most likely change now, unless it's truly fixed.

What this means to you as a web page server is that your remote clients, would need to know your server's ever-changing IP number simply in order to find it.  So one day, they find your welcome page and browse around your product catalog and so on and even bookmark it, but the next day their bookmarks won't go to your computer web server any longer, since your IP number has now changed. Instead they may end up at Joe Fantastic Kazoos or whatever.  Your customers and alpha and beta-testers can no longer find your service.  We're going to fix that here, so that they will always be able to find your server, even if it's IP number has changed ten times since the last time they looked.


[Edit]
Most people who buy a "website" are buying a domain name like www.penguins.com and an associated fixed-IP address.  The numeric, fixed address will be put into a translation table pointing at the domain name.  (This table is called DNS, you don't need to know that.)  Then your clients do not need to know your "number" as long as they know your site's name.  Typing the name into a browser's address bar, sends the name into the DNS which translates it to the number. The user's browser, then knows how to get to your site at your fixed IP address number and the user's queries hit against your web server which causes new pages to be served to them.  This is the standard procedure.  But we are going to circumvent that, because we, being cheapskates, do not want to pay for a fixed-IP address just yet, until we're sure our new product line is actually going to start generating some revenue.

Once a web server is running, anyone who surfs to the IP address associated with that web server, will see the welcome page that you've setup on your local computer for that server.  In other words, simply the act of browsing to that IP address, if you have a web server running on that computer, will cause that running web server, to serve up a page to the remote browser.  There is no requirement to have a domain name, it's simply an easier way to find your site and also makes it look more professional to the outside world, instead of this long ugly number.  We don't care about being beautiful and professional just yet, because remember we're in testing mode here only.  We want to see whether we can even generate traffic or even get some interest or response!

So our next step is to find a site, which both allows a user to create web pages for free, has a fixed location (all of these providers do) and allows the use of FTP.  FTP stands for "file transfer protocol".  It is a way for you to manually or via a program, send a file from your local computer to a remote web host.  Some free web hosts do not allow the use of FTP, so make sure you find one which does.

[Edit]
On that free site, you are going to create a page that simply says "Click here to access my Dynamic-IP Web Server", and make it a link to something like http://125.101.24.18  The number you enter here makes no difference at this point, it is merely a dummy entry.

You will now, in the programming language of your choice, write a program that does the following steps:
1) When the program launches, make it determine your current IP number. (Remember this is a DOS command ipconfig.)
2) Next make the program update the Apache configuration file (or whatever web server you're using) to instruct it what is your current IP number.  In Apache you change the config file to point to this number.
3) Next make the program actually launch Apache (or whatever web server you're using).
4) Next make the program create an HTML document that says "Click here to access my Dynamic-IP Web Server" and make that statement be a link to your current IP number like <a href = "http://125.101.24.18">Click here...</a>
5) Now make the program FTP this HTML document to your free remote website, to your standard location like http://myfreeweb.com/John_Brown/welcome.html (just an example name)

Remember that all of the above steps, you are going to program into your program.  These are not steps you're doing each time manually.  They are steps that occur just by simply launching the program.  You can now put the program into your machine's start-up script if you wish, so it launches every time you boot.  Or just put it as an icon on your desktop so you can launch it manually.

In your welcome promotional literature, or for your alpha and beta testers, you can now simply tell them to go to your site http://myfreeweb.com/John_Brown/welcome.html which will never change.  That is, the location of this free page will never change, even if the underlying IP address number changes every five minutes.  They will be able to click on the link that you've placed there, and instantly be hitting queries against your local web server.  Once you have fully tested your web server's functions, and proven that you can make money selling whatever it is you're selling, you can then spend that money to pay for a fixed IP address and a domain name.  But for now, you've gotten all they offer you, for free.  The only thing you spent is your time.  Anything you can do with a fixed-IP web server, you can do with a dynamic-IP web server, now that you know this trick on traffic directing.