Step-by-Step: Running your webserver on a different port number
August 20, 2001


If you are running webserver software that ALLOWS virtual hosting, "ip-less" domain names, or host headers, please use this article instead: Running your webserver on a different port number using host headers. (Ex: Windows NT Server, Windows 2000 Advanced/Server, Apache)

Let's get down to it.  Most web requests come across on port 80 for http.  However, due to the Code Red virus, many ISP's are now blocking port 80 which is where the virus scans.  By blocking port 80, the virus activity is slowed, but all webservers are also blocked.  This article explains how to run your webserver on a different port other than port 80. 

The nice thing about out solution is that since Code Red targets port 80, we are not aiding the virus with this work around.  Unless your server is infected that is.  Then again, if your server is infected, your computer will still be attacking other computers, with or without this work around.

If your ISP does not allow you to run servers, we do not advise you to use this information to get around it.  The only reason we're publishing this material is because some ISP's are blocking port 80 due to the virus and not because of home webservers.  Like anything else in this world, YOU are responsible for your actions.  DSL/Cable Webserver and affiliated parties are not responsible if you get busted by your ISP.  Use your judgment whether you should or should not use this information.  I trust you are smart enough to decide.

This article is not very heavy on the specifics because many of you have different types of setups and it would be useless to get into the details.  What you should get from this article are the concepts.  The concepts can be applied across all different types of setups.

In order to run a webserver on a different port number, you will have to change several things in your setup.  This article assumes a few things.

  1. Your DNS is handled by ZoneEdit.com
  2. You are using webserver software that allows you to change the port number of the web service.
  3. There are probably many more assumptions, but I can't think of them right now.  I'll add it as I go along.  Hehehe.
1.  Make changes to your DNS servers.

The work around I came up with includes using ZoneEdit.com for your DNS.  Under "IP Addresses", delete the entry for "www.yourdomain.com". Keep the "yourdomain.com" (without the www). This modification will allow people to get to your site by "www.yourdomain.com", but not "yourdomain.com" (without www).  This is a small sacrifice we will have to make.

Create an entry under "WebForwards" that forwards "www.yourdomain.com" to "yourdomain.com:8000". This basically forwards "www.yourdomain.com" to "yourdomain.com port 8000".  Port 8000 can actually be any number you want.  However, this number must be consistent through this whole process including the firewall/router and webserver software.  As you configure "WebForwards" make sure the "Cloaked" box is checked.  This way, visitors won't see the port number in the address bar.

The way this little trick works is that "yourdomain.com" is attached to your IP number.  Then we attach "www.yourdomain.com" onto "yourdomain.com:8000".  So in the end, it works out that "www.yourdomain.com" equals "your IP number + port 8000".

You might ask why don't we just attach "www.yourdomain.com" onto "your IP number + port 8000".  Well, it turns out that ZoneEdit.com doesn't allow you to do this.  I know.  I tried.

Another question you might have is what happens to "yourdomain.com".  Well, since it is attached to your IP number it will get to your IP number, but since it defaults to port 80, the request will be blocked by your ISP (if your ISP has decided to block port 80, that is).  Bottom line is "www.yourdomain.com" will work while "yourdomain.com" will be blocked.

After you make your changes, you have to wait a while for the changes to percolate across the Internet.

Here is a screenshot of my setup for cablewebserver.com.  You're should look similar.

2. Setup port forwarding in your router to forward port 8000 to your server.

If you forgot how to setup port forwarding, here's a refresher: Port Forwarding on the Linksys Cable/DSL Router

Mine looks like this:

3. In your server configuration, setup your website to run on port 8000.

This is what my IIS 5.0 Advanced Server screen looks like:

You're done. It's all good now.. sort of.  It's not as good as running on port 80, but hey, it's better than not running at all right? 

Have fun.

Brian
 



Step by Step Menu