First make sure your ports are forwarded. To do that, go here

www.portforward.com

Then make sure Firewall recognises these ports, to do that, see here,

http://www.gameconfig.co.uk/ports.as...ome:+total+war

Also see the gamespy link on the same page.

Hope that solves it, it worked for me, I had the same problem.