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 organise 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 blocks all 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, then port forwarding can be set up. This gives the firewall instructions about which types of data are allowed and how they should be directed.
Below is a diagram of the port forwarding process: