P
P
postya2020-07-31 12:45:18
linux
postya, 2020-07-31 12:45:18

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:
5f23e79ec6c44718214789.jpeg

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

3 answer(s)
A
Anatoliy Sukhov, 2020-08-01
@ayaout

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'

U
unseriously, 2020-07-31
@unseriously

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.

A
AVKor, 2020-07-31
@AVKor

ufw app list
You can set the application name during setup.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question