Sooty Solutions - Burnaby BC Consulting Company - Advising Business Managers on Security, Information Technology, Business Process Performance, & Best Practices
Sooty HomeContractors are BetterThe Sooty ApproachLong Range PlanningThe Sooty PartnersContact Us

Setting up a Web Server in Your Basement

Part 2: Set Up Your Home Router to Pass HTTP (port 80) and FTP (port 21)

This part is quick but depends heavily on what kind of router you have. There is no standard place or standard way to make your router know where to send incoming internet requests. I have a Dlink DIR-615 and the configuration is different from my old Dlink 604 so manufactures are not even consistent.

A short note on DMZ. Don't. Setting your server up in the router De-Militarized-Zone means from a security point of view it is on the scary side of the router but it is physically inside your nice safe LAN. If the security is breached in any way you might have bad guys on the computer that is next to the one you use for online banking. If you want to do DMZ experiments use NetBSD or Microsoft Sharepoint that have been built to run on the raw internet. Or better still put them on they own separate LAN wiring.

What you want to do is find the place where you can set identify "public" or "internet" and point it to your server (by name or ip address). At one time internet port 80 (http) had to go to port 80 (NAT) on your server so you got one field for port (enter 80) and one field for target (enter 192.168.0.99). Many ISPs block port 80 so the incoming port may be an alternate (like 8080) and you may have a backup server so it may go to port 80 on one server and port 8080 on the backup. Routers got more fields (NAPT) as a result.

My ISP (a good one) does not block port 80 so all I have to do was tell the router "send 80 from internet to 80 on 192.168.0.99"...and "send port 21 to 21 on 192.168.0.99". The only odd thing was I had to give each configuration action a name.

A picture is worth a thousand words:



To test put the ip address from your ISP (should be on a "status" page on your router) into your browser address line (in my example I just put 70.79.139.238 into Firefox) and you should see the Apache Welcome page:



Trouble: If you don't see the welcome page there could be a thousand things wrong:

The first thing to try is see if the ports are open. Google for a site that tests what ports are open on an ip address. I use http://www.yougetsignal.com/tools/open-ports/ but these kinds of sites often go away. Enter your ISP assigned address and port 80.

  • If the port is "open" there is something wrong with your server. Try to browse to its local address (192.168.0.99). If you don't get the welcome page it's probably time to reinstall and make sure it's using 192.168.0.99. If you do get the welcome go back to the router and make sure it points 80 to 192.168.0.99.

  • If the port is "closed" then ether the router is misconfigured or your ISP is blocking port 80. Google your ISP name and "blocks port 80" to confirm. Go back to the router and make the public port 8080 and the private port 80. Most routers will take port 8080 internet traffic and substitute the port number with 80 before passing it on to your server. Go back and see if port 8080 is open. Then browse to your ISP provided ip and force the port number (i.e. in my example http://70.79.139.238:8080).

If nothing works try to Google your router model and see if there is something you can do differently with your configuration...sorry.

Next...Part 3: Connect your domain name with your server (DNS Provider)

Part 1: Back to server installation (LAMP configuration)

Part 4: Set up your web site (HTTP server)

Part 5: Set up file upload/download (FTP server)

Part 6: Set up mail server (SMTP/MX server)