Answer the question
In order to leave comments, you need to log in
How to set a name for a program port in UFW?
I set a rule for UFW in Ubuntu OS.
sudo ufw allow 5432
Looking at the status
sudo ufw status verbose
of UFW : I see something like this:
How can I set a name for each port so that in addition to the fields TO, ACTION, FROM , , there is also a NAME field, which shows the name of the program that is running on this port?
Answer the question
In order to leave comments, you need to log in
Create a file with the name of the application, service, etc.
/etc/ufw/applications.d/name-applications
Add to file
[name-applications]
title=A title
description=A description #list
of rules for "name-applications"
ports=xxx/tcp|xxx/udp|xxxx:xxxx /udp
update app list
sudo ufw app update name-applications
enable rule
sudo ufw allow name-applications
You can simply add a comment ( comment 'name-applications' ) at the end of the rule.
sudo ufw allow in on eth0 to any port 80 comment 'name-applications'
Set a name for the port?? Can not be so. But, there is a magic file /etc/services , which shows who is sitting on which port.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question