Warcraft 2 isn’t for sale anymore on Blizzard’s store, but I would like to play the Battle.net version. Is it still playable on Battle.net, or is online play no longer supported?
Yes, it is still possible. Blizzard has re-released Warcraft II Battle.net Edition, with support for Windows 10, in the GOG store. It still includes support for the classic Battle.net multiplayer servers.
Before playing online with this version, you’ll need to manually enter your “CD key” under the “Change CD Key” menu in the launcher. You can find your CD key by opening your GOG account page in your browser, clicking on “Warcraft II Battle.net Edition”, and selecting “Serial Keys” from the “More” menu. It also asks for your name, but you don’t need to use your real name and probably shouldn’t for privacy reasons: it can be displayed to another user if they somehow try to use your CD key.
To play on Battle.net you must use the “Warcraft II (Classic)” option in the launcher. This ignores your choices under the Video Settings menu, but the other “WarCraft II” option doesn’t even have Battle.net in its multiplayer menu. You will also need to create a Battle.net Classic account in the game. Battle.net Classic accounts are not connected to GOG accounts or modern Battle.net accounts.
You may also need to manually configure your router to forward ports 6112-6119 TCP/UDP to your computer. Modern games can often automatically configure ports using UPnP, but that hasn’t been added to Warcraft II.
Outside of Battle.net, there also exists an unofficial multiplayer server and community called War2.ru, who provide an unofficial modified client called War2Combat. Unlike Battle.net, War2Combat does support UPnP, and War2.ru has a rudimentary online match history.