Nodes still connected after swarm.disconnect(). Why?

I’m running js-ipfs in node.js, and I’ve noticed that my node stays connected to the Bootstrap nodes even when I repeatedly issue ipfs.swarm.disconnect() on them. Can anyone explain why that’s the case? Any suggestions on how to actually disconnect from a peer and stay disconnected?


I’m still struggling with bandwidth issues. I’ve been able to isolate these bandwidth spikes to the Bootstrap nodes. In particular, these nodes:

  • /dns4/ (
  • /dns4/ (
  • /dns4/ (

I’m running my own private network, complete with circuit relays and bootstrap nodes. I don’t need or want to use the public bootstrap nodes. I have the public bootstrap nodes in a blacklist. Every 30 seconds the node actively scans the ipfs.swarm.peers() endpoint. If the public bootstrap nodes are found in the results, ipfs.swarm.disconnect() is called on them.

However, using iptraf-ng (on Ubuntu), shows that my IPFS node is still sending massive amounts of data to the IP addresses associated with those public Bootstrap nodes.

I’m looking for a way to prevent the node from connecting to those nodes, as a possible solution to the bandwidth problem.

I’m using js-ipfs v0.55.4, as that’s the highest version compatible with OrbitDB, which I’m also using.