I had just install Apache Httpd server, and found the documentation had some useful Useful FireWall (ufw) commands, which makes it even easier to configure ufw.
ufw app list
The ufw documentation says
ufw supports application integration by reading profiles located in
/etc/ufw/applications.d. To list the names of application profiles known to ufw, use:
ufw app list
Users can specify an application name when adding a rule (quoting any profile names with spaces). For example, when using the simple syntax, users can use:
ufw allow <name>
Or for the extended syntax:
ufw allow from 192.168.0.0/16 to any app <name>
My commands
ufw app list
gave me
Available applications: Apache Apache Full Apache Secure CUPS OpenSSH Postfix Postfix SMTPS Postfix Submission
sudo ufw allow ‘Apache’
gave me
Rule added Rule added (v6)
sudo ufw status gave me
Status: active To Action From -- ------ ---- Anywhere ALLOW 10.1.1.2 ... Apache ALLOW Anywhere ... Apache (v6) ALLOW Anywhere (v6)
Really useful functions!