Total Annihilation and DirectPlay use a set of ports to communicate between players. Before you can play Total Annihilation online, you have to forward these ports from your router to your computer. Otherwise the router won't know where to send the data coming in on these ports. Since TA isn't receiving any of the expected data when trying to connect to a hosted game, after about 40 seconds it will return a "timed out" error.
Keep in mind that when you get this error, it doesn't have to be a problem at your side. It could be the host of the game you're trying to join, or likewise the player trying to join your game. Everyone has to forward the ports, since this communication is two-way.
First things first
Before you can begin forwarding ports, you need to configure a
static Internet Protocol (IP) address for your computer.
Which ports to forward
If you already know how, these are the ports:
2300-2400 (TCP & UDP) and
47624 (TCP). The former are for joining, the latter for hosting.
If you don't know how
Portforward.com contains all the information you need about this, so if you're equipped with self-sufficient browsing abilities, you can stop reading now.
If you need more guidance, this is where to start: Router models and guides for each model
Find out your router's brand and model by examining the box, then browse the router list for
a guide on your particular model. If you can't find your exact
model, try the closest match. Chances are the router software is very
similar, if not identical. Once you've done that, you may either follow
the default guide or the guide specific to Total Annihilation.
The above should provide you all you need to get your TA working. If you're interested, you can learn more about this by reading the various articles on the help page.
I don't have a router!
Yes, you do.
If you have a broadband connection, chances are you have a router, you're just not aware of it.
The hardware setup should look like one of the following overviews (the modem and router are either separate boxes connected to one another or one box that takes care of both):
[Phone/broadband line or cable line]-----[Modem + router]-----[Computer(s)]
[Phone/broadband line or cable line]-----[Modem + wireless router] ~ ~ ~ [Computer(s)]
Example
Say my router is a ZyXEL ZyAIR G-2000. I find ZyXEL in the router list, browse down to ZyAIR G-2000 and click it. On the next page I find Total Annihilation in the list and click it. I then follow the guide to configure my router for TA.
Troubleshooting
If it still doesn't work, go over the procedure again and even a third time to make sure you did everything correctly. If you're convinced you did it correctly, and you're still getting a time out error, consider posting a question here at the forums, and provide as much detail as possible. If you need someone to walk you through any part of this, you can try asking someone on the client.