This article applies to all operating systems.
If you are playing on Voobly, you only have to forward NAT-T port, which is UDP 16000 by default. Please see this article: KB1011 Ports that you must forward to play or to host a multiplayer game on Voobly
You don't need to forward these ports, when playing on Voobly. However if you wish to play via TCP/IP you have to forward the following ports, both TCP and UDP. These ports also include the required ports for DirectPlay and DirectX using older Operating Systems.
- TCP/UDP 2300 - 2400
- TCP/UDP 6073
- TCP 47624
- TCP/UDP 27000 - 29000
- How to Port Forward your router
- DirectX: Ports required to play on a network
- Ports that you must open in Windows Firewall to play or to host a multiplayer game in Age of Empires II