ufw enable
It will turn on the firewall
ufw disable
It will turn off the firewall
ufw default allow
It will allow all connections by default
ufw default deny
It will drop all connections by default
ufw status
It will show current rules
ufw allow port
It will show allow traffic on port
ufw deny port
It will show port block
ufw deny from ip
It will allow ip block
ufw allow from ip
It will deny ip block
iptables -F
It will flush iptables
iptables -L
It will display iptables output