2

Your port 51413 appears closed because you didn't allow incoming connetions, you only allowed outgoing connections. The guide you followed is wrong in this point.
Delete the rules related to port 51413. To do that run
sudo ufw status numbered
and then delete the four related rules with
sudo u...