CrewLink-server icon indicating copy to clipboard operation
CrewLink-server copied to clipboard

LAN users cant hear and talk to WAN users and same reversed

Open antipiot opened this issue 5 years ago • 5 comments

Hello!

I have installed my Crewlink server in a docker container and tested it with some friends but we encountered some troubles:

I was connected with another user from the same network where the server resides and some friends joined trough WAN.

LAN users could hear and talk between them but not with WAN users and WAN users could hear and talk between them but not with the LAN users.

Could see everybody connected correctly on the server and lobby.

There are no Port change - only straight port mapping WAN:9736 - LAN:9736 - Container:9736 Local address of server is 10.0.0.50 WAN address is xxx.xx.xxx.60

Tested with direct connection to server with http://10.0.0.50:9736 - same result - WAN and LAN users cant talk between them Tested with a NAT loop back on the WAN address which i expected to work but same result http://xxx.xx.xxx.60:9736

Users all shows connected an gree talk circle - webpage of server is reachable and users counter report correct number of connected users.

I tested this aswell with a revers proxy without success: no connection at all - no users shows connected but webpage can be reached.

Feel free to as for some tests.

Thanks for your great work on Crewlink!

antipiot avatar Dec 16 '20 16:12 antipiot

This caused me hours of stress trying to figure out what it was, and this bug report gave me so much hope in my network not being setup incorrectly. Ran into this issue where no one could hear myself, but all my online friends could hear themselves just fine. Crewlink's voice/speaker settings were all good, showed I was connected, it even showed users in our Among Us lobby were connected to Crewlink as well!

Your configuration looks exactly as mine, I even put the IP to my server on a DMZ just to rule out local network configurations or some odd firewall changes on my pfSense.

VermontBlogger avatar Dec 16 '20 21:12 VermontBlogger

Im having this same issue with a roommate. We share an ethernet port. Any updates on a fix for this?

chilis3for10 avatar Jan 19 '21 05:01 chilis3for10

My friend too, any updates?

Teo230 avatar Jan 22 '21 23:01 Teo230

This is due to CrewLink using peer to peer for voice connections. The server has nothing to do with this.

OiYouYeahYou avatar Jan 23 '21 01:01 OiYouYeahYou

So I was having the same kind of trouble as you have (person 1 -> VPS(Crewlink) <- person2). As @OiYouYeahYou said yes Crewlink code is not at fault, but there is a lack of explanation, Crewlink use WebRTC and is implemented by simple-peer in the client project and after looking https://www.npmjs.com/package/simple-peer#connection-does-not-work-on-some-networks some firewall config is also needed. I block everything by default. The following lines where the bare minimum to make it work with nftables :

table inet filter {
        chain input {
                tcp dport 9736 accept comment "Accept Crewlink Base"
                udp dport 9736 accept comment "Accept Crewlink Voice"
        }

        chain prerouting {
                type nat hook prerouting priority -100;
        }

        chain postrouting {
                type nat hook postrouting priority 100;
                masquerade
        }

}

You also need to enable forward on the linux server + interface

So in short : Forward must be enable, and Source NAT must be configured too

AntoineMary avatar Jan 24 '21 13:01 AntoineMary