1

This may be a silly question but I was googling a lot last days and I've just found related but not a direct answer to this. In order to express it better let me mention a comparison:

If I setup an http server in a computer behind a router , I must set port forwarding and also that computer must have an static internal IP address in order to receive the requests on that port for that particular IP address. For instance, my router does not allow port forwarding so I could not set it up for the HTTP server. However , Bittorent works like a charm behind that same router without any static IP , nothing. How bittorrent can get requests and it can also seed? How other peers will connect to my computer while seeding? I did verify that when Bittorrent is running the port it uses for example 39031, is actually open ( using yougetsignal_dot_com). How the router can be made to open the port without using its admin settings ( we can also use Bitorrent in a public hot spot where is no way to mess with the router). I know the trackers may do some help, but there are a lot of information about a decentralized way with no trackers or basically that the peers are also trackers but not details on how it works.

Finally, why this "trick" (if any) cannot be used with an HTTP server and we must always depend on the router settings ?

Soner Gönül
  • 97,193
  • 102
  • 206
  • 364

1 Answers1

2

BitTorrent does work behind NAT, to a certain extent. It works better if port forwarding is configured, though.

BitTorrent works reasonably well behind NAT for the following reasons:

  • BitTorrent is peer-to-peer, and either peer can initiate a connection; therefore, communication will succeed if either of two peers is not behind NAT or properly port forwarded;
  • some BitTorrent clients are able to automatically set up port forwardings using uPNP or PMP;
  • modern BitTorrent clients use µTP instead of TCP, and some clients are able to perform UDP hole punching.
jch
  • 5,382
  • 22
  • 41