IBM Support

How to check if a client connecting to Db2 with SSL or not

Question & Answer


Question

How to check if a client connecting to Db2 with SSL or not

Answer

Option 1: Use "netstat -an"

# find its application Id
$ db2 list application
Auth Id Application Appl. Application Id DB # of
Name Handle Name Agents
-------- -------------- ---------- -------------------------------------------------------------- -------- -----
DB2V101 db2jcc_applica 2901 9.125.239.183.58365.180201033126 SAMPLE 3

# in above example, the application Id is 9.125.239.183.58365.180201033126
# 58365 is the client port number
# grep the port number from " netstat -an"
$ netstat -an | grep 58365
tcp 0 0 9.115.67.61:62999 9.125.239.183:58365 ESTABLISHED

# now you find the server listening port is 62999

$ db2 get dbm cfg | grep SSL_SVCENAME
SSL service name (SSL_SVCENAME) = 62999

# since 62999 == SSL_SVCENAME indicates it is a SSL connection.

Option 2:Use lsof -i"



# for application 9.188.123.161.34038.180201013807

db2bp 15860212 e105q9b 4u IPv4 0xf1000e00394eabb8 0t0 TCP alexx:34038->alexx:DB2_e105q9b_4 (ESTABLISHED)

SSL service name (SSL_SVCENAME) = DB2_e105q9b_4

# So it is a SSL connection.

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Not Applicable","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF016","label":"Linux"},{"code":"PF033","label":"Windows"}],"Version":"10.5;11.1","Edition":"Advanced Enterprise Server;Advanced Workgroup Server;Enterprise Server;Express;Workgroup Server","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg22013985