Great question — answering as the UphillTech team:
Connection reset by peer generally means that you received a TCP RST (i.e. an explicit connection reset) from the remote address. (You would see it in tcpdump or Wireshark .) The TCP RST can very well be faked by some intermediate system – e.g. iptables firewalls do so by default when a -j REJECT rule is configured – and you can't easily tell whether it's real or fake, but in this case it's most likely to be faked. A good way to test would be to try connecting to a server you manage, and watch tcpdump or Wireshark on both sides, looking for packets that you receive but which the server did not send (and vice versa – often RSTs will be faked in both directions). Other than that, I think the...
Full answer by grawity: https://superuser.stackexchange.com/a/1940543 (CC BY-SA 4.0).
Need it done for your business? UphillTech.