# Identifying inbound and outbound connections

**URL:** <https://community.unix.com/t/identifying-inbound-and-outbound-connections/379151>\
**Category:** AIX\
**Created:** [July 9, 2020, 4:01am UTC](https://community.unix.com/t/identifying-inbound-and-outbound-connections/379151 "2020-07-09T04:01:44Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![ggayathri](https://community.unix.com/letter_avatar/ggayathri/32/6_22734026db12803ebb3e059622ac3534.png) [@ggayathri](https://community.unix.com/u/ggayathri)\
**Post date:** [July 9, 2020, 4:01am UTC](https://community.unix.com/t/identifying-inbound-and-outbound-connections/379151/1 "2020-07-09T04:01:44Z")

</div>

I wish to identify all the inbound and outbound network connections and also the ports being for various services on an AIX server.  
Is there a command or a script that can be run to identify the existing connections.  
The situation is such that, we have migration of AIX servers happening and all the connections present on one server has to be migrated to the new one. So I need to gather the details and can someone help please.

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [July 9, 2020, 4:09am UTC](https://community.unix.com/t/identifying-inbound-and-outbound-connections/379151/2 "2020-07-09T04:09:12Z")

</div>

Hello @ggayathri

Why not use netstat?

[https://www.ibm.com/support/knowledgecenter/ssw\_aix\_71/n\_commands/netstat.html](https://www.ibm.com/support/knowledgecenter/ssw_aix_71/n_commands/netstat.html)

---

<div class="post-metadata">

**Author:** ![ggayathri](https://community.unix.com/letter_avatar/ggayathri/32/6_22734026db12803ebb3e059622ac3534.png) [@ggayathri](https://community.unix.com/u/ggayathri)\
**Post date:** [July 9, 2020, 6:25am UTC](https://community.unix.com/t/identifying-inbound-and-outbound-connections/379151/3 "2020-07-09T06:25:17Z")

</div>

Thank you. Which would be the options that I should try with netstat command, to get the result that I wish to obtain.

---

<div class="post-metadata">

**Author:** ![Neo](https://community.unix.com/user_avatar/community.unix.com/neo/32/22838_2.png) [@Neo](https://community.unix.com/u/Neo)\
**Post date:** [July 9, 2020, 6:27am UTC](https://community.unix.com/t/identifying-inbound-and-outbound-connections/379151/4 "2020-07-09T06:27:39Z")

</div>

From the link I sent you:

```
Syntax
To Display Active Sockets for Each Protocol or Routing Table Information

/bin/netstat [-n] [{-A -a } | { -r -C -i -I Interface }] [-f AddressFamily] [[ -p Protocol] | [-@ WparName] ] [Interval]

```

Why not try yourself since you have AIX with you?

---

<div class="post-metadata">

**Author:** ![vbe](https://community.unix.com/user_avatar/community.unix.com/vbe/32/266_2.png) [@vbe](https://community.unix.com/u/vbe)\
**Post date:** [July 9, 2020, 2:03pm UTC](https://community.unix.com/t/identifying-inbound-and-outbound-connections/379151/5 "2020-07-09T14:03:11Z")

</div>

> [@ggayathri](#):
>
> we have migration of AIX servers happening and all the connections present on one server has to be migrated to the new one. So I need to gather the details and can someone help please.

You don't mean you are migrating live with all running? unless you are HA... and if you are talking of LPAR from one to another server it almost the same as HA nothing really special...  
Now if its an LPAR or a physical server to another, that's different, the first rule is to be sure the admins have documented correctly what is running and what resource it uses, like keeping /etc/services up to date with what ports the different apps services use, then check if you have printers and how they are configured e.g. are they network or remote, where are the IP declared ( locally or in a distributed /etc/hosts from a unique source etc...)  
Of course the users and from where they connect and how  
etc...  
Only then (once all the above is understood...) netstat will be of big help because you may see/find things that were not expected and have to figure out what / why it is...

---

<div class="post-metadata">

**Author:** ![system](https://community.unix.com/uploads/default/original/2X/c/c7e9e16a595259edafe88615719d5c5dcda035c2.png) [@system](https://community.unix.com/u/system)\
**Post date:** [October 7, 2020, 2:03pm UTC](https://community.unix.com/t/identifying-inbound-and-outbound-connections/379151/6 "2020-10-07T14:03:16Z")

</div>

Closed on October 7, 2020, 2:03pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
