UFW allows or blocks ports, not applications.
So although you can use standard applications rather than ports, ufw converts some application names into ports.
So ...
ufw allow 80
ufw allow http
both do the same thing, open port 80 to any server listening on port 80, Apache, Nginx, or any other web server.
UFW translates these names from /etc/services
, however, /etc/services in NOT comprehensive.
So you can find services such as http
in /etc/services, and use that syntax in UFW
But you will not find Apache, nginx, or specific web servers.
See https://help.ubuntu.com/community/UFW#Services
Likewise you can not use wine
I believe from your question you are looking or what is termed an application firewall, one where you allow or deny by application.
you could use apparmor, and some would advise you do so, but that is going to be much more complicated.
See How to control internet access for each program? or similar for application level firewalls .
I am not sure how or if there is an easy option for wine or you you would have to specify each and every application run in wine.