Following the instructions to open ports for ufw firewall fixed my connection even though the firewall was not enabled.