torrust-tracker icon indicating copy to clipboard operation
torrust-tracker copied to clipboard

Consider config option to ignore connection ID expiration in UDP tracker

Open josecelano opened this issue 11 months ago • 1 comments

Relates to:

  • https://github.com/chihaya/chihaya/issues/417
  • https://github.com/torrust/torrust-demo/issues/14
  • https://github.com/torrust/torrust-tracker/issues/1096

We have recently implemented an IP ban service to ban IPs that are not sending the correct connection ID for the UDP tracker.

Initially, we thought it was a DDoS attack or spam, but it seems to be a common problem. It seems there are some BitTorrent clients that do not implement the UDP specification correctly.

image

Some people have reported bad clients even increasing the expiration for the connection ID to 2 hours. That probably means some clients don't care at all about the connection ID, presumably because some trackers don't care either.

We could add a configuration option to increase that limit, but I would prefer to strcitly follow the specification.

cc @da2ce7

josecelano avatar Dec 17 '24 16:12 josecelano

I did not remember (because it was added by @da2ce7) there is already a configuration option to increase the lifetime of the cookie:

[[udp_trackers]]
bind_address = "0.0.0.0:6969"

  [udp_trackers.cookie_lifetime]
  secs = 120
  nanos = 0

@da2ce7 suggested to add a flag to ignore connection ID on the weekly meeting.

[[udp_trackers]]
bind_address = "0.0.0.0:6969"
connection_id_validation_enabled = true # deafults to `true`

  [udp_trackers.cookie_lifetime]
  secs = 120
  nanos = 0

josecelano avatar Dec 19 '24 11:12 josecelano