Many of us have a DSL connection at home. Most of us can configure the DSL router by our selves and most of us can even port forward the ports that are needed. But do we really know why and when it is needed to be done?
Let’s say we have a DSL connection installed at our house or our business. We have three computers, all getting Internet from the same router with Ethernet or wireless connections. Let’s also suppose that we have a web server installed on one of the three computers listening to TCP port 80.
When someone from the Internet tries to access our web server, his browser sends a request at port 80, but our router doesn’t know to which computer the request should be forwarded, since all three of them have the same Internet IP address. As a result, the host (our web server) becomes unreachable.
When we do port forwarding, we assign to the router instructions that when someone from the internet requests information from a specific port (80 in our case), the request should be forwarded to a specific computer identified by its local IP address, 192.168.xxx.xxx for example. The local IP, that the computer hosting the web server has, is usually assigned from the DHCP of the router. Therefore, when someone asks information on that port, router forwards the traffic automatically to the specified computer based on the information we’ve entered to the router.
Port forwarding is not needed when we don’t want to host something on a computer on the local network. To explain myself a bit more, let’s say we want to play a game that requires an Internet connection. When we start the game and connect to the game server we initialize the connection so after that, our router knows where the traffic from the game server should go.
As a tip, when you want to port forward a specific port to a given local IP you should make sure that the computer that will host that service (in our case the web server) will not have his local IP changed by the DHCP of router. We can accomplish this by logging in to the web management console of the router and on the screen that we can see all the directly connected computers to the router, there should be an option that we can enable for keeping this already assigned IP “binded” to the MAC address of the computer that hosts the service. Then we’re ready for port forwarding. Note that in many cases this option can be also found at the DHCP panel of the web configuration panel of the router.
If you don’t know how to port forward some ports that you need “open”, since every router has a different way to port forward, PortForward.com will help you very much since it has the specific changes that have to be made to almost every single router on the market and for every possible protocol.
Many network programs require that one configure port forwarding in the router.
Setting port forwarding in the router for your server application can be a challenge. Fortunately, most routers support a standard called Universal Plug and Play (UPnP).
BaUPnP is a free tool that automates the process. The tool, by default, configures port mapping for the two ports used by web-servers — that is port 80 (HTTP) and port 443 (HTTPS).
BaUPnP can also do port mapping for other ports by simply specifying the port mapping as command line arguments.
The following example configures port mapping for FTP (port 21) and Telnet (port 23):
BaUPnP.exe 21 23
Searching for UPnP enabled router…
WAN 69.104.77.3
LOCAL 192.168.1.100
Configuring port mapping for UPnP enabled router
For ports 21 23
Port forwarding was successful
Please see the following page for more information and download instructions:
http://barracudaserver.com/products/tools/upnp/