$ sudo ufw status

$ sudo ufw deny all

$ sudo ufw allow ssh

$ sudo ufw allow http

$ sudo ufw allow https

$ sudo ufw app list
Example Output
Available applications:
    Apache
    Apache Full
    Apache Secure
    OpenSSH

Check /etc/ufw/applications.d directory to see profiles present or to create new app profile.

$ sudo ufw status numbered
Example Output
Status: active
  To     Action      From
 --       ------      ----
[ 1] 22/tcp    ALLOW IN  Anywhere
[ 2] 80/tcp    ALLOW IN  Anywhere
[ 3] 443     ALLOW IN  Anywhere
[ 4] 22/tcp (v6)  ALLOW IN  Anywhere (v6)
[ 5] 80/tcp (v6)  ALLOW IN  Anywhere (v6)
[ 6] 443 (v6)   ALLOW IN  Anywhere (v6)

$ sudo ufw delete NUM
Replace NUM with appropriate serial number from previous command sudo ufw status numbered.

$ sudo ufw disable