Rollback " ufw allow 22 "

As already explained there, your router already blocks all incoming traffic, if you did not fiddle around with the Port rules.
Only servers need open ports, that’s why all the websites you visit are on machines that have open ports. You only need outgoing ports for that, which the computer handles automatically for you, but you don’t need any open incoming ones for that.
Similar with Torrent, although you can have an open port which would help Torrent work better, you don’t need one.
You only need open ports if peers are directly connecting to you.

That said, sometimes your router automatically opens incoming ports for you, but that depends on the program requesting the open port, as well as the router’s capability and permissions to handle UPnP requests.

2 Likes