How find ip in ipfs

Hello

I wanted to ask how it is possible for the address of the hash file to be censored by the government?
For example, is there a way to find the IP address of a file hash like QmQmgCHB5wd1LCRDCYXW4VPvSmsUDhYfgGxerpre6xWz8v? And become a censor?

Thankful

If we’re talking about a single peer, yes the IP can be found out. For example if a file was searched via:

ipfs dht findprovs QmQmgCHB5wd1LCRDCYXW4VPvSmsUDhYfgGxerpre6xWz8v

The returned peerIDs can be looked up via ipfs dht findpeer <peerID>. However with the nature of IPFS, many people could be providing that file, just by accessing it they may be rehosting it in their cache temporarily.

If you’d like to completely hide your IP address, and share data, you can use IPFS behind something like Tor, I2P, or a VPN.

2 Likes

Thankful
Is there a way to do this using tor?

It looks like some work’s being done to have IPFS function natively with Tor, relevant links:

1 Like

I uploaded two files for example in slate.host but after ipfs dht findprovs no ID is displayed!

ipfs dht findprovs bafkreiguedvhhzhfsfwusgdhtqq6ydncwaqzuzlr4uiedbxnzyi65oibvi

ipfs dht findprovs bafkreiary3mvopcdyfdwguz2jqhpvoiegrtcjzduhar4eltmk3kyvkihwm
1 Like

I run into that a lot actually. I can retrieve a file, but yet it doesn’t show up in findprovs for some reason. I’ll ask about this, and get back to you (or maybe someone else will :slight_smile:).

It turns out that using a DHT (whether the IPFS Public DHT, some local one, one using an alternative networking stack like Yggdrasil, etc.) is just one of the ways a node might find content.

Another way that go-ipfs nodes find content is by just asking the nodes they’re already connected to if they happen to have it. This mechanism itself leads to a few outcomes:

  1. If you’ve been downloading some data from node A and then they have content they haven’t put in the DHT yet since their provide queue is backed up (or even if they have turned off their advertising/providing system entirely) you’ll still be able to find and fetch the data from them
  2. You might “accidentally” find a node that has the content you’re looking for just by your DHT client trying to keep its routing tables fresh. Similar, things could happen if you were using PubSub. If your node or the one with the content have high connection limits the chances of finding someone who happens to have your content by accident increase.
  3. People can (and some do) build alternative systems outside of go-ipfs for finding content and you’ll fetch it all the same. For example if I learn that Node A has some data from some forum, shared database, pubsub channel, etc. I can just do ipfs swarm connect <node A address> and ipfs pin add <data CID> and my node will download the data anyway.
1 Like