-
Notifications
You must be signed in to change notification settings - Fork 2
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
How to get the public IP of the node that's connecting to the bootstrap server #1
Comments
Hi @jeshocarmel , if your VPC nodes are in the same local network, they will connect to each other, and if your nodes have public address, it should work too, you can look more info at #657 |
Yes if the VPC nodes are in the same local network it's working. When I use instances of AWS where they are not connected through the local network but are only connected through internet, the discovery fails |
All your VPC nodes have their own public ip address ? I didn't tested with AWS VPC, but I guess it's problem of the public ips, can you listen with your public ip address? if not , there maybe the problem of NAT. :) |
Exactly. AWS doesn't allow to listen on the public IPs. This is the NAT problem. Any workaround that you know of? |
I think you can add a NAT relay node, then routing with DHT(bootstrap) to make your VPC nodes connect to each other, try this go-libp2p/#527 may help you |
I tried this out. Not working. I'm writing down the code I used Bootstrap Server (BS):
Instance (EC2) A:
Instance (EC2) B (same as above):
Both A and B are not establishing connection with each other. They are both connected to the bootstrap server and their private addresses are being received by the each other. I can see that in my fmt.Println(p) statement . Any help is appreciated. Thanks |
This works. Now successfully able to communicate |
@jeshocarmel good job 👍 |
Thanks @BenDerPan |
First of all @BenDerPan thanks for this awesome bootstrap server code. I'm using chat-with-rendezvous example as the basis for the application that I'm developing.
I'm using Amazon default VPC on my nodes to connect to the bootstrap server. They all connect to the bootstrap server (I'm using the Public IP of the bootstrap server) but their Private IP is being listed in the multiaddr and they fail to connect to each other.
I know that using a VPC would solve this problem, But I'm trying to make this work on the public internet. Any leads?
The text was updated successfully, but these errors were encountered: