I added a file using an IPFS node which is a Linux VM in GCP. Now, I tried getting the file from my local machine but was not able to fetch the content using the CID. Does it take time for the file to propagate through the IPFS network?
Am I missing something? Do I have to enable something on the GCP VM to allow getting files from it? ( I am able to see the peer ID of the GCP VM when I use dht findprovs command.
Your node needs to be reachable from the internet. If you are behind a NAT router, you need to set up port mapping or enable relay client on your node. once that is done, other nodes will be able to get your content
Thanks for the info.
Apparently, adding firewall rules for enabling the IPFS ports did the trick for GCP. I did this for all ports ( 3 ports ) shows in the “ipfs dameon” output. Do we really need to enable for all 3?
For anyone who comes back later, just add a firewall rule in GCP to enable traffic for the ports that are shown in your “ipfs daemon” output. The source IP can be 0.0.0.0/0.
Typically, you need TCP 4001 and UDP 4001 (unless you have changed those default values). The other ports shouldn’t be exposed, unless you have a really good reason to do so.
That makes sense to me. Thanks.