It’s time to put the final piece in our puzzle and actually “Go Live” on the Internet with our ISP-In-A-Box. “We don’t have a web site yet,” you might be saying. Actually, we do. Go to http://localhost, and you’ll see it. It just doesn’t do much. But we will fix that early next week. If you want a preview of the data-driven web site we plan to build on your computer next week using PHP and MySQL, just click on this link. Once it’s built, you can customize all of the web content for your site using PhpMyAdmin to edit a simple MySQL database. It’ll even support Google Ads (as shown in the sample) if you decide you want to get rich quick or you can paste your favorite family photo on the top of your web page, but we’re getting ahead of ourselves. Our task for today is to get you a fully-qualified domain name so that people can access your web site from the Internet without typing http://188.8.131.52 (or whatever IP address has been assigned to you by your ISP).
Prerequisites. In order to complete today’s tasks, you should already have bought your Mac mini and activated the Apache Web Server. Before you can build a data-driven web site next week, you’ll need to install MySQL and PHP. If you haven’t already gotten this far, consider this your Saturday Night homework assignment. The entire ISP-In-A-Box series is now available in PDF format for download here.
Deciphering Your IP Address. Before we can link a domain to your IP address, we first need to know your IP adddress. If you don’t know it, you can obtain it by going to http://mundy.org/ip.php from the web browser on your Mac mini on the network connection where you plan to run your web server. You’ll also need to know whether you have a static (stays the same) or dynamic (ever changing) IP address. Chances are it’s dynamic.
Choosing An Internet Service Provider. Most ISPs only provide dynamic addresses unless you pay an additional fee. For about the same money, you can obtain a full-service web hosting account. Can you use a dynamic IP address and still host a web site from your house? The answer is maybe. While still using dynamic IP addresses, many ISPs including many cable providers rarely change your IP address. My experience with both Time Warner and Comcast is that they force an IP address refresh about once every six months. If you use one of these providers, you’re in pretty good shape hosting a web site from your home. Fortunately, AT&T is out of the broadband business. For a time, they actually blocked incoming port 80 access to customers’ machines. However, there’s even a workaround for that problem now which we will get to. At the other extreme in the ISP world are PPPoE providers such as Earthlink which disconnect, reconnect, and change your IP address regularly during the day, if not the minute. These ISP’s are all but unusable for hosting a web site from your home. If you have service from one of the latter ISP varieties, you have two choices: use your ISP-In-A-Box as a staging server and purchase a web hosting account for your “live” web site or switch to a more accommodating Internet Service Provider.
Choosing a Domain Name. There are two approaches in selecting a domain name for your ISP-In-A-Box. First, you can select a name such as wmundyhome.dyndns.org which rides on someone else’s domain and provides dynamic updating of your IP address whenever your ISP changes it. Or, second, you can purchase any available domain you like (such as webify.us), and manage IP address changes yourself. Either approach works. The latter is obviously more personal and more professional. And, with the right ISP, the manual updates of your IP address are not that burdensome. The two examples I’ve provided actually both point to the same server in my basement which is connected to the Internet through a Comcast cable modem. There used to be a significant difference in the cost of the two options; however, that has all but gone away. The dyndns.org solution is free, and the personalized domain is now less than $10 per year from many sources.
Using DynDNS.org. If you opt to use dynamic IP address updating, you first will need to register at DynDNS.org and obtain a username and password. What we’re going to do in this scenario is link a dynamic IP address to a static hostname for your computer. There is no cost. Whenever your ISP changes your IP address, your router’s built-in update client will notify dyndns.org of the change (after you configure your router to do so), and the DNS table will be updated for all the world to see. Step 1 is to select a hostname for use with one of dyndns.org’s registered domains. There are several dozen domains from which to choose. Log in to your dyndns.org account, click on Dynamic DNS, and then choose Add a Host. Enter the hostname you wish to use (your name with no spaces usually works well) and select a domain from the pull-down list. Then enter the IP address of your Internet connection which you obtained earlier. You’re finished at dyndns.org, and your qualified domain name (joeschmo.homeip.net) should be accessible on the Internet within a few hours. Sometimes it takes a bit longer. This domain name will continue to find your web site until your ISP changes your IP address.
To find your web site after an IP address change, you either have to manually update the address on dyndns.org’s web site, or you have to configure an update client to do it for you. Most new hardware router/firewall’s have this capability built in, but you’ll need to configure it. In addition, there is a Mac application, DNSupdate, which can do it as well. We covered that in our first ISP-In-A-Box installment although I hope I’ve pursuaded you not to put all your security apples in one basket to save a measly $30.
To configure your router for dynamic IP address updating, open the router admin program using your web browser. Typically, there is a Dynamic DNS menu option. You then would specify www.dyndns.org as the provider and insert your fully-qualified domain name, username, and password just as you entered it on the dyndns.org web site. Save your changes, and you’re good to go.
Using Your Own Domain. Becoming the master of your own domain is not a big deal these days. What used to cost hundreds of dollars is now under $10 with lots of features that we just happen to need. To make sense out of this article, we really needed to set up a domain to play with so we could walk you through all of the steps. I’ve done that with webify.us, which now is pointing to a server in my basement that’s connected to a Comcast broadband Internet connection through a Netgear wireless firewall, router, and print server. Yes, we do eat our own dog food before offering it up to you. We’ve chosen Omnis.com as our domain registrar for two reasons: they’re dirt cheap ($7.95 per year for most domains) and they offer a great feature set (DNS Manager, URL forwarding, and proxy routing) at no additional cost for those that want to run a web server out of their own home. Are there other suitable providers? Absolutely. But you need one that provides the feature set I’ve described, and no one today is any cheaper than the one we’ve chosen. Register.com provides a similar service for only $35 a year or $19.99 a year for multiple years. So you do the math.
The first step is obviously to select a domain that no one else has already registered. Most registrars have a link on their site to let you test various domains until you find one that’s available. For our example, we chose webify.us. Pretty clever, huh? Once you select your available domain, the registrar’s web site will walk you through the registration process during which you will set up a username and password to manage your domain. Write it down, and don’t lose it! It is a huge hassle to prove who you are these days. Make certain that you choose to use the registrar’s name servers during the registration process. Once the registration process is completed, go do something for a couple hours while your account is being set up. Your domain may not actually be available on the Internet until tomorrow.
The second step is to log into your account at your domain registar’s web site. In the case of Omnis.com, you click on the Manage My Account tab on the main page. Once you’re logged in, click on the Manage DNS option. You’ll be warned that this is dangerous but continue on. Once you get to the DNS page, click on one of the little question mark icons and read about Proxy and URL record types. These aren’t really legitimate DNS record types. They are special routines to make it easy to point a domain at a home IP address or a non-standard HTTP port, i.e. not port 80. Remember, I told you about AT&T’s cute trick of blocking port 80 access. The proxy record would let you point your domain to a different port, e.g. port 81 and reconfigure Apache to host your web site from that port.
For our purposes today, we’re going to use a Proxy record to point our new domain to our home IP address. Move to the DNS Manager – New Record section of the web form and make two entries. For the first entry, insert just the values shown below in italics on the form (leave the other fields alone) and use your own home IP address in the Content. Then click the Add New Record button.
For the second entry, insert just the values shown below in italics on the form (leave the other fields alone) and substitute your own home IP address in the Content. Then click the Add New Record button again.
Now all you need to do is wait (usually several hours but it can take a day) for the DNS information to propagate to the DNS name servers, and you should be able to reach your home web site using your new domain name from anywhere on the Internet. That’s all there is to it … until your ISP changes your IP address. When this happens, just log back in to your registrar’s web site and modify the two entries above to point to your new IP address. Within a few hours, you’ll be back in business. Join us next week and we’ll build a real data-driven web site on your Mac mini that you can fill with any web content you desire. Have a great weekend.