Setting up port forwarding
You'll find information on what ports are required to be accessible to play certain games, get a service in an application to work or run servers in abundance on the Internet. For example, EA Games list what is needed for a Battlefield 2 server to run properly. Imagine you're running one on your computer, behind a router. You'll need to forward these ports through the router to your computer.
The first thing you'll have to do is log in to your router through its web admin interface. They all work differently, but have similar principles. Hopefully you've already set your router up and know how to get to the configuration pages! Once you're in, there are two terms to look out for. Either 'port forwarding' or 'virtual server'. One or the other is likely to be listed somewhere.
The top picture is of a hilariously cheap router which uses a very common web admin interface. It lets you specify a range of incoming ports, but only one port to forward to. I'd imagine the latter is simply where the range starts, because you can't forward a group of ports to a single port. The lower picture is a somewhat friendly port forwarding page. It is in fact an Operating System called Clark Connect, used to turn an old computer into a router, rather than having to buy one. Expect to see a virtual server/port forwarding page somewhere between the two on your router.
Seeing as at the time of writing, Battlefield 2 is a popular game, we'll stick with it for use as an example. Let's imagine we're running a server that we want our mates to be able to connect to over the Internet. Here's what EA say you need open:
Protocol | Port |
---|---|
UDP | 27900 |
UDP/TCP | 29900 |
TCP | 80 |
TCP | 4711 |
UDP | 27901 |
UDP | 1500-4999 |
UDP/TCP | 1024-1124 |
UDP | 29900 |
UDP/TCP | 27900 |
UDP | 16567 |
UDP | 55123-55125 |
That's a hefty list. In a lot of cases you'll only need one port or one range forwarding, but just in case, let's look at a few of the methods you need to know.
Regardless of whether you're forwarding a range of ports or a single port, you need to know whether the protocol being used is TCP or UDP. First on our list is UDP port 27900. Unless you get clever and start reconfiguring servers, you'll want to forward from one port number to the same port number, like so:
Then you'll have to set the IP address of the computer to forward to. This means, in general, that you'll have to set up the computer in question with a fixed IP, rather than have it obtain one automatically, something not covered in this article.
Click add, and BOOM, the port will be added to the forwarding list.
Let's try something tricky now, specifying a range!
Gosh, that wasn't so hard! If you have to forward both UDP and TCP protocols, you might be able to select "both" as an option. If not, forward the ports for UDP, then do them again for TCP.
For the forwarding settings to take effect, you may need to save and reboot your router. It will probably give you some indication of whether this is necessary.
Points to note
Hopefully now it's clear that forwarding ports isn't actually that hard, it's just a matter of knowing which ports to forward and where to forward them to. Here's a rundown of what you need to remember:
- Consult documentation or the Internet to see if you need any incoming ports open for your game/application/server to work.
- Find out whether they use TCP or UDP protocol.
- Forward the ports to the IP of the machine running the game/application/server.
- You cannot forward the same port to two IPs, except perhaps if they're different protocols (one UDP, the other TCP).
- If the IP of the machine you're forwarding to isn't fixed, you may one day find the forwarding stops working because the machine's IP has changed.
- Outgoing connections don't need port forwarding setting up. A TCP or UDP packet can get out of your LAN onto the Internet without trouble, it's just the other way around that can sometimes be the problem.
- If you forward a port, then the machine you've forwarded to is accessible from the Internet on that port. Make sure you don't forward ports unnecessarily, and for safety you may wish to run a software firewall on that computer.
If you get stuck, even after reading this guide, then head to the HEXUS.community for more advice!