As a web professional, having a testing environment is a must. Yeah, I could spend additional money and time trying to configure a leased virtual private server (VPS), but these days, I’m on a tighter budget. Can’t I just use what I already have to create an online space that my clients can access when I’m building their site?
Of course I can, with the help of port-forwarding.
Port-forwarding is a simple concept with your router. We all know that in order to connect to the internet, our cable supplier provides us a cable-modem that communicates to their service and provides us a high-speed connection and an IP address. If you have multiple computers in the house, in order to share that internet connection, you need a router, preferably a wireless router. That router is bundled with web-based software that allows you to manipulate how your computers not only connect to the internet, but how the internet connects to your computers. Port-forwarding is the management of this incoming connection.

Many web protocols (surfing the web, FTP, SFTP / SSH, etc.) utilize certain ports to connect computers to servers. When you browse to a website, your computer connects to that server on port 80. In fact, navigating to http://yourwebsite.com and http://yourwebsite.com:80 yield the same result. If you wanted to run a website off of your computer, a person navigating to that website would try to connect to your computer on that same port. But, if someone looks up your website, and your internet provider routes the connection to your home and ultimately your router, how does the router know which computer to send that connection to serve up that website? By setting up port-forwarding, you tell the router that if an incoming connection appears on this port, forward the connection to this computer and this port.
So how do you port-forward? Luckily, there is a mighty repository of how-to instructions for your router to port-forward a variety of different protocols (Xbox Live, BitTorrent, etc.) over at portforward.com. If you want to setup a quick webserver, check out MAMP for Macs and WAMP for Windows machines. Then all you need is your IP address (navigate to ipchicken.com to find that out) and you’ve got a website running on your computer at home for a test environment. Remember to port-forward from port 80 to your webserver port, usually 8888.
Bonus tip: Instead of having to type in the IP address to navigate to the test website, signup for a free Dynamic DNS account.



By Fredric Mitchell | Thu, Aug 7, 2008 10:03 am