While there are various technologies that aim to simplify the configuration of P2P clients, one of the most important optimizations any user can make to improve download speeds is to manually open ports on their router. The process varies depending on the wide range of available models, but the essence remains the same in all cases, and today we'll explore it more closely.
A week ago, a friend began noticing strange symptoms in her P2P client. Frozen transfers and slow new downloads appeared out of nowhere, and with a bit of detective work via chat, we discovered the culprit was a new McAfee firewall she had installed. Once removed from the path, opening the ports on the router correctly was a matter of a couple of additional steps, and according to her, the performance difference is more than noticeable. Features like uPnP should eliminate the need to open ports, but the accumulation of experiences in recent years tells us that the old method is superior. The problem is that port opening is not intuitive. It requires entering the router's internal configuration, navigating through its interface (which is often terrible), encountering demonic terms (STP-MAC Cloning-QoS-NAT-DMZ, etc.), and finally reaching the appropriate section. Fortunately, the web offers an increasingly wide volume of information about modems, routers, hybrids, access points, and other devices that allow port forwarding.
Step 1: Assign a Static IP Address
The first step is to assign a static IP address to the network card of the computer hosting the P2P client. Why is this necessary? In very relaxed terms, the router “needs to know” for which address the port forwarding is intended. The DHCP system tends to keep things relatively stable, but there is a possibility that it assigns a different IP address one day, and if that happens, the router won't be able to do its job. To begin, open a system console (“cmd” in Run, or “Command Prompt” in Accessories), and run the 'ipconfig' command there. This will show the IP address assigned to your network card. It likely uses the format “192.168.1.x”, “192.168.0.x”, or “10.0.0.x”, but it's important to know this data exactly. Now go to “Network and Sharing Center” in the Control Panel, click on “Change adapter settings”, right-click on the network card, and choose “Properties”. Then we enter the properties of the “Internet Protocol Version 4 (TCP/IPv4)” module, and here we replace the automatic IP assignment with a manual address. What address do we put? The reality is that we have a bit more freedom than it seems, but we must follow the line of the gateway, that is, the router's IP. For example, if the router's IP is 192.168.1.1, the address can be the next number, 192.168.1.2, or any other up to a maximum of 192.168.1.254, although some routers use that last address as default. The goal is clear: The IP address must be static, while avoiding conflicts with other devices. The subnet mask value remains 255.255.255.0, and the gateway at 192.168.1.1. DNS values can remain automatic, or be replaced with external DNS servers, like OpenDNS and Google DNS.
Step 2: Configure Your P2P Client
Once the changes are applied, load your preferred P2P client and enter its connection properties. The content of this article is based on qBittorrent but its essence is valid for other BitTorrent clients, and even eDonkey-compatible clients, with eMule at the forefront. It's recommended to choose a high port number so we can avoid collisions with services that claim exclusive use of low ports. Anything above 25000 should be safe, and in my case it's 29541. It's necessary to disable uPnP and the random port selection, because if it were to change with each new instance, what we do later in the router will have no value.
Step 3: Access Your Router's Configuration
Armed with the static IP address and port number, it's time to get our hands dirty in the router's internal configuration. To do this, we use any browser, enter the router's IP address as a web address, and enter the username and password. In most models we see 'admin' as user and pass, and other combinations like 'admin' and '1234'. Other models leave the username or password blank. If for some reason your provider changed the username and password, you will have to claim this data. Despite what they say on the other end of the phone, there's no excuse to deny you this information... although there's the resource of a general 'reset' on the device to clear those values. If you bought the router yourself, you won't have this problem.
Step 4: Set Up Port Forwarding
Yes, I admit it: The internal configuration interfaces of routers are a real disaster. Completely anti-user in every way. The translations are horrible, and some of the parameters are scary... but we know exactly what we want, so it's a matter of finding the right path. The number one online resource to learn more about your router's configuration is the portal called PortForward.com. Enter the router database, search for your brand and model (if it doesn't appear in the list, a similar model should work), locate the application you want to configure, and follow the steps entering both the static IP number of the network card and the port you chose in the client. On the Cisco DPC2420 modem-router, this involves visiting the 'Setup' tab, clicking on the 'Port Forwarding' section, and filling in all the fields: Local IP address (static IP), start port and end port (the same port for both), protocol (depends on the use, but here we put 'Both'), and a check on 'Enable'. The process under DD-WRT is very similar, with the difference that we must click on the 'NAT/QoS' tab, then go to 'Port Forwarding' and assign each entry, which in DD-WRT need a name.
In general, it's not necessary to restart the devices once they receive new ports to open, but I recommend it anyway. If you've reached this point, congratulations: The ports for your P2P client should be properly open. If your computer has any software firewall, it will need to register the appropriate exception for the P2P client and/or the ports you've opened (this 'should' be automatic), so that the same thing that happened to my friend doesn't happen to you. Then there's the possibility that your provider applies throttling despite the port forwarding. In those situations, it's recommended to enable traffic obfuscation on each client... but that is another story. Good luck!