You are here

Part 3 - Setting Up Your Router

* A note about internet connections *

Your internet connection type will ultimately determine the experience of your players. You must have a fiber optic-based connection. This includes:

Please don't try. The latency is too high and the upload speeds are not sufficient.

Assuming you have a fiber optic connection, you will still need to have enough upload speed to deliver the thousands of game updates each player needs every second. While there's formulas you can follow to figure out your exact upload bandwidth need, here's my general recommendation:

2.4 megabits (2400 kilobits) of upload speed for a 24-player server

You can test your download and upload speed at the following speed test sites:

* Choosing a router *

Most home-based wireless routers are cheap pieces of crap that die every 12-18 months. If you router says "D-Link", "Linksys", or "Netgear" it will probably not do the job for you. These consumer-level routers do not have the capabilities you will need and most often crash and burn under moderate to heavy packet load.

In the spirit of rolling your own, I highly recommend the following router distribution:

m0n0wall -

Some of the key benefits of m0n0wall are:

  • It is completely free
  • It runs on any PC with two network cards (minimum 128MB of RAM)
  • It has advanced inbound and outbound NAT capabilities
  • It has traffic shaping options
  • It fits on 16MB flash media

My last router build cost me about $50 and was:

  • Dell GX100 (Intel Celeron 550MHz, 128MB RAM), $20 on eBay
  • Dual-port 10/100 Intel NIC, $15 on eBay
  • IDE to Compact Flash adater, $15 from NewEgg
  • Compact flash card I had laying around

The whole router setup used about 35 watts. With older systems your mileage may vary.

If you're into spending a bit of money, I suggest checking out Mini-Box ( They have a bunch of Mini-ITX based motherboards and cases, plus some really cool embedded stuff. The ALIX WIFI boards are fully supported by m0n0wall.

* Setting up your router *

This section was not meant to be this long, but I can't help myself when it comes to telecommunications. For router setup, I'm going to assume you're running m0n0wall and would like to know how to get it going.

Step 1 - Install m0n0wall

Obtain the latest version from the m0n0wall website and install it on to your router. When the router boots you may need to run the brief setup wizard to attach it to a network card. After accessing the web GUI, ensure that your internet connection is setup working properly.

For the purposes of this guide, I am assuming the following network configuration:

WAN - DHCP - m0n0wall - Your server

Step 2 - Change the outbound NAT settings

Click the NAT menu option on the left. Click the Outbound tab. You will see a screen with a check box. Check the box that says Enable advanced outbound NAT and click Save.

Next, click the (+) button to create a new outbound NAT mapping. In the Source box, type in your network (e.g. and select its mask (e.g. /24). Check the box that says Avoid port mapping. Apply the changes once you return to the Outbound NAT page.

This setting is critical as it prevents your server from being listed incorrectly on the Valve master server list. With port mapping enabled, your server running on port 27015 will get added on the list with the wrong port number (thus preventing players from finding it).

Step 3 - Create a new Inbound NAT rule

Click NAT menu option on the left. Make sure you are on the Inbound tab. Click the (+) button to create a new NAT rule.

Change the protocol to UDP.

(This will prevent RCON access from outside your network. I personally don't see the need for anyone to have RCON so I leave it turned off. SoureMod provides RCON capabilities if needed.)

In the External port range, put 27015 in the From: box. You can leave the To: box empty.

In the NAT IP box, enter the IP address of your server (e.g.

In the Local port box, enter 27015

Make sure to check the box that says Auto-add a firewall rule... and click Save. Apply the changes when you return to the NAT Inbound page.

Step 4 - Enable traffic shaping

In a nutshell traffic shaping will permit you to better share the internet connection you have. This will help your server when someone at your house decides to start downloading large files or sharing music on bitorrent while your server is populated.

Before proceeding, find out the speed of your internet connection. You can do this by looking at a recent bill or running multiple speed tests at the sites listed above.

Click the Traffic shaper menu option on the left. Check the box that says Enable traffic shaper and click Save.

Click the Magic shaper wizard tab. Check the box that says Share bandwidth evenly on LAN.

Next, enter your Downstream and Upstream speeds in the boxes. This must be done in kilobits per second (kbps). For example, my Verizon FIOS connection is sold to me (and tests at) as 35 megabits down and 20 megabits up. Therefore I entered:

Downstream speed: 35000
Upstream speed: 20000

Click Install/Update. This activates your traffic shaping.

Step 5 - Test

I recommend that you test your new router setup to make sure everything is working correctly. Pull the power on your router a couple of times and plug it back in to make sure it comes back up. Download and upload some large files while watching the CPU graph to make sure you're not overloading the router's main processor.

* Domain Name System (DNS) *

See Wikipedia:

Since this guide assumes DHCP from your internet provider, you will want to setup some kind of dynamic DNS service so that players can always find your server if your IP changes.

For example, your IP might be today but change to tomorrow. You'd like to have some kind of .com/.net/.org that always points to your current IP.

Enter DynDNS:

DynDNS allows you to create a host name (e.g. and have it updated automatically by your server (using the DynDNS update software) or by your router. m0n0wall fully supports DynDNS and many other dynamic DNS services.

To setup DynDNS, create an account at their website using a valid e-mail address. Next, create a new host. You will need to "check out" and activate the service for $0. I believe they allow up to 5 free hosts. Their pro upgrade isn't too bad - 30 hosts for $15/year.

To add the new host name in m0n0wall, click the Dynamic DNS menu option on the left. Pick your service type (e.g. DynDNS), enter your host name (e.g. and enter your username and password. Click Save to activate the change.

To confirm m0n0wall is updating the host name properly, you should see a line in your system log similar to the following:

/usr/local/bin/ez-ipupdate[3231]: successful update for em1-> (

* Note: Setup of a host name is highly recommended if you plan on using HLstatsX.