Port forwarding is the process that a router or firewall uses to sort the right kind of network data to the right port. Computers and routers use ports as a way to organize network data. Different types of data, such as web sites, file downloads, and online games, are each assigned a port number. The router or firewall uses forwarding to send the correct data to the correct place.
A firewall protects a computer by blocking unauthorized information, but if a firewall blocked all the incoming and outgoing data, the computer would be unable to access the Internet. When a computer user wants some data to go through the firewall and to send it to a specific location, he can set up port forwarding. This gives the firewall instructions about which types of data are allowed and how they should be directed.
Information on the Internet is associated with a port. Web pages, for example, are typically assigned port 80. File transfer protocol (FTP), often used for downloading and uploading files, typically uses port 21. Online games may use a number of different port numbers, but often choose numbers in the thousands.
Someone who has multiple computers on a network will likely find that they do not all need all of the data that comes into the network. Port forwarding allows the user to send the relevant data to the computer that will use it. If a web server is hosting a website and a second computer hosting an online game, this process will make sure that each computer receives the data it needs without being bogged down with data intended for the other computer.
In this situation, a person would use port forwarding to instruct the router as to which computer is the destination for which data. The instructions would send all incoming requests for web pages to the web server. This data would come in to the router at port 80, and the forwarding instructions would route that data to the web server.
The online game server might be set to use port 5500. Any data that comes to the network at port 5500 should be from people trying to play the online game using the computer as a host. The forwarding information in the router will direct all data coming in using port 5500 to go to the online game hosting computer.
Using port forwarding also serves as another way to protect computers. People outside the network will only have access to the router or firewall, which will, in turn, control which types of data reach the computers. Any data that does not come to the router with the correct port will not be passed through to the computers inside the network.
Not only does this keep incoming data flowing to the right computer, but it also helps to protect a network by limiting and controlling outside access. If a network includes a web server, FTP server, or game server, or runs other services that require outside access, this process will help keep the network safe and running smoothly.