Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Feb 1, 2023 7:26:05 AM
Jul 22, 2020 1:46:04 PM
TLS communication is not natively supported by IBM's ODBC iSeries driver. This however can be accomplished using Stunnel.
Index:
Stunnel is a proxy designed to add TLS encryption functionality to existing clients and servers without changing the programs' code. Its architecture is optimized for security, portability, and scalability (including load balancing), making it suitable for large deployments.
Once the Stunnel is installed, its time to configure different system components. The steps can be summarized as below:
Note: You can always test from Linux with isql delivered with the unixODBC.
The following prerequisites must be met:
Define local IPs and corresponding DSNs in the /etc/hosts, as shown in the example below:
127.0.0.1 localhost localhost.domain
127.0.0.11 DBSSL1.localhost
127.0.0.12 DBSSL2.localhost
127.0.0.13 DBSSL3.localhost
Do this by cat.. command and copy the contents to a text file:
cat certificate.pem > certificate.txt
Configure odbc.ini for the SSL-enabled instances. See the example below:
[DBSSL1]
DRIVER=IBM i Access ODBC Driver 64-bit
SYSTEM=DBSSL1.localhost *The local address defined in odbc.ini
QRYSTGLMT=*NOMAX
QUERYTIMEOUT=0
BLOCKFETCH=1
BLOCKSIZE=8192
COMPRESSION=1
TRACE=0
SSL=1 **So far appears to do nothing but document the fact that the connection is secure
Configuring the Qlik Replicate Endpoint
The DB2i endpoint should be configured in Qlik Replicate. The option discussed in this document is to use the odbc.ini defined in the DSN, nevertheless, a “Use connection properties” option could also be used pointing to DBSSAL1.localhost, just like in odbc.ini:
Several steps can be taken to validate whether the connection is secure:
A tcpdump command can be used to determine whether the communication is successfully leaving the server to the correct destination port:
$ tcpdump -i eth2 `port 9471`
Run the following command on the iSeries:
WRKOBJLCK userid *USRPRF
This will display the jobs using the service account userid.
You may need to scroll down to see a QSQSRVR which is the initial connection job, there is not much information to be extracted from this job.
Below this, you will see a QZDASOINIT and/or QZDASSINIT