IBM Support

Who is using port 23 or 992?

How To


Summary

This document is an example of using Db2 for i Services and SQL to see who is connected using Telnet port 23 or 992.

Objective

Db2 for i services can be leveraged via an SQL query to determine what IP addresses are connecting to the Telnet non-secure port 23 and secure port 992.

Environment

IBM i Access Client Solutions using Run SQL Scripts or any other SQL query interface.

Steps

The following is an example script to identify users connecting to port 23 or port 992 :
SELECT AUTHORIZATION_NAME,
JOB_NAME,
LOCAL_PORT,
REMOTE_ADDRESS
FROM QSYS2.NETSTAT_JOB_INFO
where (LOCAL_PORT = '992' or LOCAL_PORT = '23')
AND AUTHORIZATION_NAME <> 'QTCP'

Document Location

Worldwide

[{"Type":"MASTER","Line of Business":{"code":"LOB68","label":"Power HW"},"Business Unit":{"code":"BU070","label":"IBM Infrastructure"},"Product":{"code":"SWG60","label":"IBM i"},"Platform":[{"code":"PF012","label":"IBM i"}],"Version":"7.3.0"}]

Document Information

Modified date:
19 September 2025

UID

ibm10869198