wesher icon indicating copy to clipboard operation
wesher copied to clipboard

should bind on ipv4 and ipv6 per default

Open yonghan opened this issue 5 years ago • 4 comments

I have having a hard time joining the mesh network started by the designated VPS.

The error message is always either 'connection refused', or 'i/o timeout'.

I was connecting both through IPv4 and IPv6 and got the same results.

Ports are opened.

yonghan avatar Oct 02 '20 06:10 yonghan

This sounds a lot like a firewall issue. What do you mean "ports are opened"? Can you try something like the following:

On hostA: nc -l -u 51820

On hostB: nc hostA -u 51820

This should allow you to type stuff in one terminal and see it appear in the second. If that doesn't work, then you have a network issue and something is filtering the packets. You should also try the same for port 7946.

costela avatar Oct 02 '20 09:10 costela

I realized that nc over IPv4 works perfectly, so I tried connecting wesher through IPv4 and it connects and I can ping the two hosts using the in-tunnel IPv4 address.

Here's what I did:

On Host A: # wesher --cluster-key XXXX

On Host B: # wesher --cluster-key XXXX --join 1.23.45.67

They connect. (Not sure what happened when I posted my OP stating it doesn't work over IPv4)

However connecting through IPv6 still yielded the same errors as above. On Host B: # wesher --cluster-key XXXX --join 2001:db8::3 yields * Failed to join 2001:db8::3: dial tcp [2001:db8::3]:7946: connect: connection refused

I double checked the firewalls on both hosts and the have been set up to allow connections on ports 7946 and 51820.

yonghan avatar Oct 02 '20 15:10 yonghan

I have to specifically bind wesher on Host A to use IPv6 address in order to let Host B to connect via IPv6.

yonghan avatar Oct 02 '20 15:10 yonghan

Indeed, the automatic binding isn't picking up ipv6. Will have to look into it.

costela avatar Oct 03 '20 05:10 costela