Port forwarding is the process a router or firewall uses to order the correct type of network data on the correct port. Computers and routers use ports as a way to organize network data. Different types of data, such as websites, file downloads, and online games, are assigned a port number. The router or firewall uses forwarding to send the correct data to the correct location.
Port forwarding is useful when you have multiple devices connected to a router, as it allows you to redirect network traffic to the appropriate port.
A firewall protects a computer by blocking unauthorized information, but if a firewall were to block all incoming and outgoing data, the computer would not be able to access the Internet. When a computer user wants some data to pass through the firewall and send it to a specific location, he can configure port forwarding. This instructs the firewall on what types of data is allowed and how it should be routed.
Port forwarding requires a user to access a router’s settings.
Information on the Internet is associated with a port. Web pages, for example, are typically assigned port 80. File Transfer Protocol (FTP), which is often used to download and upload files, typically uses port 21. Online games can use various different port numbers, but they usually choose numbers in the thousands.
Someone who has multiple computers on a network is likely to find that not all of them need all 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 one web server hosts a website and a second computer hosts an online game, this process will ensure that each computer receives the data it needs, without interfering with data destined for the other computer.
In this situation, a person would use port forwarding to tell the router which computer is the destination of which data. The instructions would send all incoming web page requests to the web server. This data would arrive at the router on port 80 and the forwarding instructions would forward this data to the web server.
The online game server can be configured to use port 5500. All data coming into the network on port 5500 must come from people trying to play the game online using the computer as a host. The forwarding information in the router will direct all data received through port 5500 to the computer hosting the online game.
Port forwarding also serves as another way to protect computers. People outside the network will only have access to the router or firewall, which in turn will control what types of data reaches the computers. Any data that does not arrive at the router with the correct port will not be transferred to computers within the network.
Not only does this get incoming data flowing to the right computer, it also helps protect a network by limiting and controlling external access. If a network includes a web server, FTP server, or game server, or runs other services that require external access, this process will help keep the network secure and running smoothly.