Port not open but still able to download : how does it work?

3

When using p2p softwares such as a torrent client or emule I am unable to open ports even if I allow them in my firewall and forward them in the NAT configuration. Even after doing those two things the p2p softwares say that the port is closed.

However I am still able to download, so how does it work, why do we care about the port if the softwares are able to receive packages even tho they detect the incoming port as being closed ?

ChiseledAbs

Posted 2016-05-10T11:47:28.977

Reputation: 715

Note that not all P2P services will work as you describe. Bittorrent for instance will function minimally without forwarded ports, but will not support lots of features, and is generally considered impolite, as other users cannot benefit from your participation in the swarm the way you benefit from theirs. – Frank Thomas – 2016-05-10T12:08:13.077

Answers

3

You have a stateful firewall: it accepts incoming packets if they belong to an existing connection. That way you can connect to other hosts (e.g. web servers or P2P users) and don't have to explicitly allow replies coming in.

(Ports aren't like doors or windows – more like labels on a packet, based on which the firewall allows specific packets to pass through. The same port can be "open" in the sense that a program is waiting for connections to that port, but "closed" in the sense that a firewall blocks those connections, and vice versa.)

However, if you connect out, those other hosts need to have the necessary ports allowed in their firewalls. With P2P connections that can easily become a problem: if both people decide they're fine with only outgoing connections, well, that also means neither one can accept connections from the other.

So most of the time you can still download from P2P users who have their firewalls set up correctly (and upload, but only if you connect first) – but nobody will be able to connect to you.

user1686

Posted 2016-05-10T11:47:28.977

Reputation: 283 655

So what you describe would just limit my upload but not my download ? Also how come that the port remain closed even after I disable my firewall, given that I'm forwarding the port in the NAT configuration ? Also there is an option random ports in the p2p clients, so for the p2p network to work everybody would should open all their ports since each peer is using a different random port ? – ChiseledAbs – 2016-05-10T12:15:21.163

Well, you always choose the ports on your side. So the option would only change what ports your client listens on, but not what it connects to. – user1686 – 2016-05-10T12:30:33.153