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.
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg22013985