You need to point to the port where the CCITCP started task listens, on whichever LPAR or machine you are targeting.
When configuring CCIPC (SSL or not, makes no difference) the IP Name or address you enter represents the machine address or LPAR where the target CCITCP task runs. In no case should enter the address for the CCITCPGW (Gateway). A DRAS discovery will return domain IDs from across LPARs if the target CCITCP task is defined to a CCITCPGW. The default listening port for a CCITCP task is 1202. That's why the default CCIPC configuration port is also 1202.
If you configure your CCIPC to point to the Gateway (CCITCPGW) listening port, usually 5202 or 7202, the symptom you may experience is one where CCIPC will test successfully, but a DRAS discovery will return an empty list.
If there is any question about whether your target CCITCP task is listening on the default port, you can check the first page of the task output for the eye catcher "listening on port xxxx". Whatever port appears therein is what should go into your CCIPC configuration.