Hi,
Could you please try the following way of allowing ports through ufw
- Enable: sudo ufw enable
- Check status: sudo ufw status verbose
- Check the status of incoming and outgoing connections status and make necessary changes
sudo ufw default allow incoming
sudo ufw default allow outgoing