-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot connect peers behind NAT #16
Comments
Take a look at the implementation in the 'hyperdiscovery' module, do you still have issues connecting using that? Curious also if you can run the 'p2p-test' cli tool on your machine? |
As I can see
I found though that the issue might be that I need some sort of hole punching mechanism in order to connect, but as far as I see |
I'm experiencing similar issues with this test script I wrote. The peer address is found through the DHT, but no connection is established. I've been testing communication between a Windows 10 and macOS High Sierra machine. |
After some more debugging, I found that remote peers only seem to connect to each other over uTP when |
I'm still having this issue. I use both DHT & DNS (also using the In my non-nat machine I see incoming connections that have a host like '192.168.1.60', from an outside network. So something's going wrong there. |
I have the same problem when using DAT/Hyperdrive in Docker. I have exposed the ports and peers get discovered but dropped after 4 failed connection attempts. I have tried creating the connection manually on both ends using opts.announce but I get the same issue. @samuelmaddock can you elaborate a little about how you solved the issue if you did? Thanks! |
@skerit @DennisSchwartz I wrote a module using discovery-swarm to connect peers to a host, swarm-peer-server. It has an echo server example you could try using to test if peers connect: https://github.com/samuelmaddock/swarm-peer-server/blob/master/examples/echo.js Also, you should use dat-swarm-defaults, not |
Awesome, thanks! I'll have a look at that. |
I'm having same problem as @DennisSchwartz with Docker and 4 retries. I have tried few different network configurations with Docker including host option (which should in theory not have NAT problems at all but no help). Using Has anybody got swarm working inside a Docker container? |
@0fork Sorry for committing the internet crime of not posting my solution after finding one - kinda. First of all, I couldn't run it in a docker container locally. So my current workaround is to just run it in our cluster, and use Minikube for local development (which is a bit of a pain tbh). Hope this helps. |
I wanted to link my issue here from mafintosh/hypercore-multicast-swarm#1 multicast-swarm because it solved my NAT issue. The issue is that it supports only hypercore at the moment but I'm lacking skills to make it support hyperdb. All help appreciated! |
I'm trying to use
discovery-swarm
withhyperdrive
. On a local network the peers successfully find each other, but if I try to connect to a peer and we both behind NAT, they won't find each other.I use the servers used in
datland-swarm-defaults
.How you supposed to connect in this case? I'm quite new to these things so maybe I'm missing something.
The text was updated successfully, but these errors were encountered: