What is Port Forwarding?

Jeff Petersen
Jeff Petersen

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.

Port forwarding is useful when you have multiple devices connected to a router, because it allows you to redirect networking traffic to the proper port.
Port forwarding is useful when you have multiple devices connected to a router, because it allows you to redirect networking traffic to the proper port.

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.

Port forwarding requires a user to access a router's settings.
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), 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.

Jeff Petersen
Jeff Petersen

Jeff is a freelance writer, short story author, and novelist who earned his B.A. in English/Creative Writing from Creighton University. Based in Berkeley, California, Jeff loves putting his esoteric knowledge to good use as a EasyTechJunkie contributor.

You might also Like

Discussion Comments


I'm using a VPN to privatize my downloading. When I have it turned on, it seems to block certain TCP ports that I have setup in my router, but when I have the VPN turned off these ports work. Is there a way to open these ports through the VPN?


I use a VPN service called hushtunnel and it also has a VNC included. the program interface is great as it makes everything easy and simple - you just control it from there. So if you are playing games it will sort it out for you automatically.


I am trying to run a server for Team Fortress 2 on Steam, and I want to run my game server on port 27015. If I want to run it on 27015, do I forward the UDP port 27015?


do i require port forwarding if i want to use udp instead of tcp for transferring my streams through icecast?


It finds out, but it takes shorter time to have a fixed receiver (ip address) when there is something incoming on a port. I think port forwarding means that the incoming on a port first is sent to the computer set to that port. If it's the wrong computer, the router uses the normal slower procedure. In a router, you can only set up one computer for each port.


It does know automatically. But,by using port-forwarding you make sure the data gets to your X-box immediately without going all around the router when on 'automatic'. Basically, it will increase your speed of play.

E.g., if you are playing a 'shoot-em-up' game against somebody and you both have the same 'ping' times etc (you're both equal in other words), if you shoot each other at exactly the same time, the chap with 'port-forwarding' assigned to his X-box will win.


I don't know a lot about computers or the internet but my understanding of port forwarding is that it configures your router to allow certain downloads through. is that correct?


My assumption is that, for example, like MSN using port 6901, at the moment we log in, this port is open and when outside people want to chat with you, a packet is sent at the router (gateway) and and aspect router to do something like trying to look at which computer is opening port 6901. Then it forwards appropriate packets to you.

What i mean is, each software would have its own port number as soon as the software needs Internet access.


@anon42253: yes each software that has a running engine on one system and user nodes on the other, definitely have port forwarding. Otherwise it won't work at all.


I think port forwarding is so stupid, why do you have to go through so much trouble with a wireless modem. With my old modem you never had to enable any ports. It's such a waste of time.


It does know. Your router may or may not be preconfigured with the ports required by the 360 to work being open.

If you have an older router those ports could be closed and the 360 unless it has its own ability to configure which ports it uses will not work.


Does each software have a port number to communicate with the local host?


can you give me clear information about port forwarding?


One basic question that I still do not understand about port forwarding: as in playing an internet game on Xbox360, why is port forwarding necessary?

Why doesn't the router know automatically what to do with the incoming data for the game?

Post your comments
Forgot password?