Checking open ports in a system

Hi,

There are two servers which needs to be connected via the port number 1521 from a remote server.

This is the port config in the first server : L28tstream1 :

[root@L28tstream1 ~]# netstat -tulpn | grep 1521
tcp        0      0 10.67.26.183:1521           0.0.0.0:*                   LISTEN      23988/tnslsnr
[root@L28tstream1 ~]#

This is the port config in the 2nd server : L28stream2 :

[root@L28stream2 ~]# netstat -tulpn | grep 1521
tcp        0      0 :::1521                     :::*                        LISTEN      24017/tnslsnr
[root@L28stream2 ~]#

As you can see, the way the port is open in both the servers above is different. For the first server, the port is stated with the ip address, whereas for the 2nd one this is not the case.

Also for the first server, the "Foreign Address" column displays as 0.0.0.0:* whereas for the 2nd one it just has some dots like :::*.

How are the lines above configured for each server to look like how they look above? What do the differences mean? What do the dots indicate?

The second looks like an IPv6 address, but I'm surprised the protocol listed is tcp and not tcp6

I vaguely remember there being bugs in netstat which gave the symptoms you are seeing.

You might want to try the newer 'ss' command instead, supports wider terminals.