add rules in afw ubuntu code example Example 1: enable ufw ubuntu sudo ufw enable Example 2: ufw allow port sudo ufw allow http sudo ufw allow 80