Ubuntu server firewall install and setting

How To Set Up a Firewall with UFW on Ubuntu 14.04?: https://www.digitalocean.com/community/tutorials/how-to-set-up-a-firewall-with-ufw-on-ubuntu-14-04

Some UFW command:

sudo apt-get install ufw [install]

sudo ufw default deny incoming
sudo ufw default allow outgoing

sudo ufw allow ssh
sudo ufw allow 22 [or your ssh port]

sudo ufw allow http
sudo ufw allow https

sudo ufw allow [port for your web admin!]

sudo ufw allow ftp
sudo ufw deny ftp

sudo ufw allow 22
sudo ufw deny 22

sudo ufw disable

sudo ufw status verbose

sudo ufw enable