IPFS ports firewall

can someone tell me which port numbers and of with protocols (tcp udp) I have to open in my firewall for ipfs daemon to work better?
I have asked this on Cannot transfer between two firewalled machines but don’t know if that thread still has support.

1 Like

in this file we see

TCP 4001 5001 8080 8081
UDP 4002/udp

that is more ports then what I thought. thank you

Assuming you’re not trying to expose your daemon’s API/gateway to the public internet, opening port 4001/tcp should be sufficient.

1 Like

hi i think we need also 5001

Regards this issue see the answer on Cannot transfer between two firewalled machines

1 Like

Hi, I am trying to upload a file to the IPFS node which is running in GCP, CentOS 7 (using js-ipfs).

this.ipfsApi = ipfsAPI(‘localhost’, ‘5001’) - works fine
but
this.ipfsApi = ipfsAPI(‘GCP Instance’s IP’, ‘5001’) - does not work and it says connection refused. I have allowed all ports actually, but still no luck reaching out to this.

I want to upload the files from my client to the remote node, without using the local node. Any help would be greatly appreciated.

Thanks in advance.