# How to view the ports of a host

**URL:** <https://community.dynatrace.com/t/how-to-view-the-ports-of-a-host/49008>\
**Category:** Open Q&A\
**Tags:** infrastructure-operations\
**Created:** [November 21, 2024, 2:47pm UTC](https://community.dynatrace.com/t/how-to-view-the-ports-of-a-host/49008 "2024-11-21T14:47:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsoria](https://avatars.discourse-cdn.com/v4/letter/d/258eb7/32.png) [@dsoria](https://community.dynatrace.com/u/dsoria)\
**Post date:** [November 21, 2024, 2:47pm UTC](https://community.dynatrace.com/t/how-to-view-the-ports-of-a-host/49008/1 "2024-11-21T14:47:40Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![JoseRomero](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/joseromero/32/19486_2.png) [@JoseRomero](https://community.dynatrace.com/u/JoseRomero)\
**Post date:** [November 21, 2024, 3:11pm UTC](https://community.dynatrace.com/t/how-to-view-the-ports-of-a-host/49008/2 "2024-11-21T15:11:01Z")

</div>

Hi&nbsp;[@dsoria](https://community.dynatrace.com/user/68109)

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

```javascript
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

```

 ![JoseRomero_0-1732201793240.png](https://global.discourse-cdn.com/dynatrace/original/3X/4/e/4ecf5a3b04a06f9ea23279b108329629f0325cf7.jpeg)  
[community dashboard host port ip.zip](https://community.dynatrace.com/uploads/short-url/m1xYKRdl0IuPir2BLsdcRR5QRL4.zip) (1.44 KB)

---

<div class="post-metadata">

**Author:** ![dsoria](https://avatars.discourse-cdn.com/v4/letter/d/258eb7/32.png) [@dsoria](https://community.dynatrace.com/u/dsoria)\
**Post date:** [November 21, 2024, 3:19pm UTC](https://community.dynatrace.com/t/how-to-view-the-ports-of-a-host/49008/3 "2024-11-21T15:19:00Z")

</div>

Gracias Jose fue solventado . Mil gracias

---

<div class="post-metadata">

**Author:** ![JariI](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@JariI](https://community.dynatrace.com/u/JariI)\
**Post date:** [July 11, 2025, 8:19am UTC](https://community.dynatrace.com/t/how-to-view-the-ports-of-a-host/49008/4 "2025-07-11T08:19:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wmyers](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/wmyers/32/18290_2.png) [@wmyers](https://community.dynatrace.com/u/wmyers)\
**Post date:** [January 9, 2026, 2:49pm UTC](https://community.dynatrace.com/t/how-to-view-the-ports-of-a-host/49008/5 "2026-01-09T14:49:21Z")

</div>

I also was curious about the “outgoing” ports used, as these don’t seem to be available the same way as `listeningPorts` in&nbsp;[@JoseRomero](https://community.dynatrace.com/user/57563)’s answer above.&nbsp; 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](http://hostA.example.com) | Apache Webserver B | 123.123.123.123 | 80, 443 | ???, ???, ??? |
| [hostA.example.com](http://hostA.example.com) | Oracle Database | 213.213.213.213 | 1521 | None |
