ipfs / kubo

An IPFS implementation in Go
https://docs.ipfs.tech/how-to/command-line-quick-start/
Other
15.89k stars 2.98k forks source link

document types of NAT traversal that fails #2198

Open whyrusleeping opened 8 years ago

whyrusleeping commented 8 years ago

This issue will be used as a discussion grounds for network topologies that result in poor connectivity due to NAT traversal failure. My goal is to document the different scenarios we currently fail to address, and then from there figure out a good way to address them.

alexeicolin commented 8 years ago

Does IPFS attempt to discover external IP of the node? If it does, this doesn't appear to be working. I have a node A behind a punched NAT that has not a single incoming connection on 4001 to the relevant interface. 'ipfs id' reports only private addresses, one per listening interface. I have another internet-facing node B. On node B, node A's entry in 'ipfs swarm addrs' contains only node A's private addresses. (Incidentally, node A and B are in a VPN and they did connect to each other via the VPN interface.)

Is it possible to configure the addresses to be advertised to peers explicitly in the config file? I found config items only for the interfaces on which to listen.

EDIT: And, in the external-addresses config, would it be possible to specify legacy-DNS domain names? Useful for nodes with dynamic IPs, but with a Dynamic DNS domain.

BuddyMacMarr commented 4 years ago

Good Day all. This is the only reference I found to IPFS config file and use of the addresses.announce and addresses.noannounce. There does not appear to be a verified resolution, so I thought I would ask. I have added these lines to the config file but either they are not being used when the daemon starts or I am looking in the wrong place for verification. x's inserted in this post to block who knows what. "Addresses": { "API": "/ip4/127.0.0.1/tcp/5001", "Announce": "/ip4/69.15.xx.xxx/tcp/4001", "NoAnnounce": "/ip4/12.208.x.xx/tcp/4001", "Gateway": "/ip4/0.0.0.0/tcp/8080", "Swarm": [ "/ip4/0.0.0.0/tcp/4001", "/ip6/::/tcp/4001" ] Starting the daemon produces the usual status messages and appears to ignore the config data. Specifically it still shows Swarm listening on /ip4/12.208.x.xx/tcp/4001 as the only reference to an outside address. Which it accurately gets from the external firewall, but it is not the address that it should be advertising. - Thanks for any direction or a later post on this subject.

hsanjuan commented 4 years ago

Hi @BuddyMacMarr , please head over to https://discuss.ipfs.io/ for these questions. The configuration you post is invalid (Announce/NoAnnounce should be arrays). If IPFS is not failing to start it is because it is not reading that config file.

BuddyMacMarr commented 4 years ago

Thank You