matrix-org / matrix-federation-tester

Tester for matrix federation written in golang.
81 stars 17 forks source link

missing time-out because of firewall drop #8

Closed ghost closed 5 years ago

ghost commented 7 years ago

I was trying https://matrix.org/federationtester/api/report?server_name=matrix.example.com but I was receiving after a minute (without any other response):

504 Gateway Time-out

The server didn't respond in time.

When I ran this in my laptop, I didn't have IPv6 setup, so http://localhost:8080/api/report?server_name=matrix.example.com returns:

(...)
  "ConnectionErrors": {
    "[2a00:1508:100:ffff::d]:8448": {
      "Message": "dial tcp [2a00:1508:100:ffff::d]:8448: connect: network is unreachable"
    }
  }

After opening the firewall https://matrix.org/federationtester/api/report?server_name=matrix.example.com returns me:

  "ConnectionErrors": {
    "[2a00:1508:100:ffff::d]:8448": {
      "Message": "dial tcp [2a00:1508:100:ffff::d]:8448: getsockopt: connection refused"
    }
  }

(so yes I have a problem with matrix listening IPv6)

but I proved that in IPv6 this program requires a TCP timeout because of a firewall dropping packets. Probably the same can be reproduced with IPv4.

To easily reproduce it, use for example: https://matrix.org/federationtester/api/report?server_name=google.com

richvdh commented 5 years ago

I think this is the same as #10