Games that can be played with others online often require various communication ports to be opened. If using a router these ports may not be open, causing ports are needed by the game - this information should be in the manual or available online.

Then change the router settings so that data arriving through the ports in question is sent to the computer playing the game. You'll need to change the router's settings. There are some excellent instructions for various routers at/ab552.