Hello,
So, a day ago, me and my friend decided to play 0 A.D. together. My PC is more powerful, I have better internet connection and had some previous experience of hosting servers because I used to host dedicated Minecraft and Terraria servers and they worked perfectly fine. First of all, I port-forwarded 20595 for both TCP and UDP as suggested. Then I ensured that we both used Alpha 21 and created a lobby.
My friend joined together with some other players perfectly fine, however after I launched the server and the map loaded, my friend got disconnected with the message "Connection to server lost. Reason: Unknown reason". He tried reconnecting but ended up getting the same error over and over again. Other players could play just fine. At first I thought the problem was on his side(even though I was not sure what was the cause of it), but when he tried connecting to lobbies of other players, he could play without any issues.
At this point I decided to write this topic. I should also mention, that none of us use UPnP for extra safety and that we live separately(we don't use LAN or VPN). We both allowed pyrogenesis.exe through Windows firewall. Any kind of help would be appreciated.