Comments (11)
This is because there needs to be some confidence on the observations in autonat; you need to connect to enough peers to verify that (I think it's 3 or 4), so you can't get it from a single bootstrapper.
We could expose the ForceReachability option in go-libp2p, should be simple to implement if you care for a patch.
from go-libp2p-daemon.
Seems you are announcing 0.0.0.0 addresses with the -hostAddrs
option.
from go-libp2p-daemon.
And you are also only listening on localhost. That's definitely not what you want.
from go-libp2p-daemon.
-listen address is using for connecting to daemon from binding, isn't it? It may be unix socket as well. Do we (with @deniskamazur ) misunderstand something? What is the proper way to start p2pd node with public IP and several nodes under NAT so that "under NAT" nodes acquire "behind NAT" IP and may connect to each other?
from go-libp2p-daemon.
Sorry, my bad -- you are right. I haven't touched this code in a while and I forget what all the options do :)
from go-libp2p-daemon.
Your addrs options are perfectly fine, sorry for my misleading comments.
from go-libp2p-daemon.
ok, so your bootstrappers are using tcp and you are listening on quic; I wonder whether this is a problem in this case.
from go-libp2p-daemon.
which shouldn't be because it is also using the default transports.
from go-libp2p-daemon.
I describe task detailed. We have node with public IP (node A):
$ ./p2pd -tls=1 -connManager=1 -natPortMap=1 -autonat=1 -dhtServer=1 -hostAddrs=/ip4/0.0.0.0/tcp/5000
Control socket: /unix/tmp/p2pd.sock
Peer ID: QmUN5jQC26K3FM3XSjjPcKBWZAaxB9NiQBcL3XZPhaWvPX
Peer Addrs:
/ip4/92.53.78.235/tcp/5000
/ip4/127.0.0.1/tcp/5000
and node under NAT (node B) with bootstrapping to node A:
$ ./p2pd -tls=1 -connManager=1 -natPortMap=1 -autonat=1 -dhtClient=1 -b -bootstrapPeers=/ip4/92.53.78.235/tcp/5000/p2p/QmUN5jQC26K3FM3XSjjPcKBWZAaxB9NiQBcL3XZPhaWvPX -hostAddrs=/ip4/0.0.0.0/tcp/44002
Control socket: /unix/tmp/p2pd.sock
Peer ID: Qmdn5vaZ3tR81wfDVQ5m1Z4dWmKXUFwuhPNGvwf5FYM1CM
Peer Addrs:
/ip4/192.168.1.150/tcp/44002
/ip4/127.0.0.1/tcp/44002
Bootstrap peers:
/ip4/92.53.78.235/tcp/5000/p2p/QmUN5jQC26K3FM3XSjjPcKBWZAaxB9NiQBcL3XZPhaWvPX
Peer addrs list contains only LAN addresses. But if connect to global IPFS network node B has "behind NAT" IP:
$ ./p2pd -tls=1 -connManager=1 -natPortMap=1 -autonat=1 -dhtClient=1 -b -hostAddrs=/ip4/0.0.0.0/tcp/44002
Control socket: /unix/tmp/p2pd.sock
Peer ID: Qmdp341BhnUdZxxPU873qP6NtYT1DrdMGNixG9S41wJKfL
Peer Addrs:
/ip4/192.168.1.150/tcp/44002
/ip4/127.0.0.1/tcp/44002
/ip4/109.252.14.143/tcp/19973 <--- behind NAT IP. Why it shows only if connect to IPFS network?
How to run node A (public IP machine) so that node B gets its "behind NAT" ?
from go-libp2p-daemon.
Thanks for your help!
from go-libp2p-daemon.
The ForceReachability option actually did not solve our problem as running only one bootstrap doesn't return the public IP
from go-libp2p-daemon.
Related Issues (20)
- Update build to stop using gx
- Panic on launch with gossipsub HOT 4
- Crash on daemon shutdown HOT 4
- Any instruction? Examples? HOT 1
- Print version information in help / --version HOT 1
- Cannot build xerrors on MacOS go1.13 HOT 3
- `Stream.reset`?
- Windows failure due to prometheus/client_golang HOT 1
- Missing module with go 1.12
- Howto connect to daemon HOT 6
- Remove secio usage as default connection encryption
- Running with configuration file HOT 2
- creack/pty v1.1.7 needs to be upgraded to v.1.1.11 HOT 1
- Usage Documentation HOT 1
- Bad error message when running p2pd with no arguments
- Listen flag is confusing
- Resurrect project by updating go-libp2p version HOT 2
- manual release created (v0.5.0)
- cannot build with Go 1.21
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-libp2p-daemon.