How to view the ports of a host

Estimados buenos días

Por favor su gentil apoyo necesito consultar por puertos levantados en el servidor y poder detectar que puerto esta bloqueado.

Gracias por su gentil apoyo.

[Google Translate]:

Good morning

I need to check for raised ports on the server and be able to detect which port is blocked.

Thank you for your kind support.

Hi @dsoria

You can use properties of process group and Ip’s from Host entities, Here are a dashboard with variable that you can use.

fetch dt.entity.process_group_instance
| expand listenPorts
| filterOut isNull(listenPorts)
| fieldsRename dt.entity.process_group_instance = id
| filter in(entity.name, $process)
| expand dt.entity.host = belongs_to[dt.entity.host]
| filter in(dt.entity.host, $host_id)
| fieldsAdd dt.entity.host.name = entityName(dt.entity.host, type:"dt.entity.host")
| fieldsAdd dt.entity.host.ips = entityAttr(dt.entity.host, "ipAddress")
| fields 
        `Host` = dt.entity.host.name,
        `Host Ips` = dt.entity.host.ips,
        `Process` = entity.name,
        `Process Port` = listenPorts


community dashboard host port ip.zip (1.44 KB)

Gracias Jose fue solventado . Mil gracias

Is it possible to add information about if the connection is “incoming” or “outgoing” as well? And also perhaps the remote/target hosts?

I also was curious about the “outgoing” ports used, as these don’t seem to be available the same way as `listeningPorts` in @JoseRomero’s answer above.  I need to be able to create a report of something like:

Hostname Process Name IP Address Incoming Port(s) Outgoing Port(s)
hostA.example.com Apache Webserver B 123.123.123.123 80, 443 ???, ???, ???
hostA.example.com Oracle Database 213.213.213.213 1521 None