Multiplayer not working on Mac

I downloaded the latest Forge version (1.6.55) and a Mac with M1 processor. However, I can't play multiplayer. If I create a server, I see no error but my friend can't access (he also has an M1 Mac, so I should try with another person). But if I try to access a server my friend created, I start to see errors and can't join. Do I need to do something to make it work or isn't working at all?