How to use Squid proxy as reverse proxy server for RTC SCM operations.
![](http://jazz.net/_images/myphoto/819a38f4408c701015ed42a5e5735936.jpg)
Hi Sam, Thanks for above mentioned answers and notes.
I tried following the way defined in this article https://jazz.net/library/article/325 for configuring a Squid proxy (ver 3.5) to work as a reverse proxy for all my RTC SCM operations (RTC ver 6.0.3). After configuring my Squid.conf file like this <o:p> </o:p>
--------------------------------------------------------------------------------------------------------------------------------------------------- <o:p> </o:p>
https_port 443 cert=/cygdrive/C/squid/certs/server.pem accel key=/cygdrive/C/squid/certs/privkey.pem <o:p> </o:p>
cache_peer 80.231.143.40 parent 443 0 no-query originserver name=httpsAccel ssl login=PASSTHRU sslflags=DONT_VERIFY_PEER <o:p> </o:p>
cache_peer_access httpsAccel allow all <o:p> </o:p>
cache_replacement_policy heap GDSF <o:p> </o:p>
memory_replacement_policy heap GDSF <o:p> </o:p>
cache_dir aufs /cygdrive/C/squid/cachedir 800480 256 256 <o:p> </o:p>
cache_mem 200000 MB <o:p> </o:p>
cache_store_log none <o:p> </o:p>
coredump_dir /cygdrive/C/squid/coredump <o:p> </o:p>
refresh_pattern . 0 20% 4320 <o:p> </o:p>
cachemgr_passwd disable all <o:p> </o:p>
maximum_object_size 4096 MB <o:p> </o:p>
maximum_object_size_in_memory 8 MB <o:p> </o:p>
buffered_logs on <o:p> </o:p>
visible_hostname localhost <o:p> </o:p>
max_filedescriptors 3200 <o:p> </o:p>
logfile_rotate 7 <o:p> </o:p>
http_port 3128 <o:p> </o:p>
----------------------------------------------------------------------------------------------------------------------------------------------------- <o:p> </o:p>
I am unable to connect my RTC client using the Repository connection URL https://10.30.80.9:443/ccm <o:p> </o:p>
ERROR: he error says unable to find server, make sure your server is up and running <o:p> </o:p>
Also when I tried to verify the Squid via Curl command curl -k https://10.30.80.9:443/ccm/service -v -u jtsadmin <o:p> </o:p>
<o:p>
</o:p>
it gave this message <o:p> </o:p>
<o:p>
</o:p>
STATE INIT -> Connect handle 0x6000704e0 line 1404 <connection= -5000> <o:p> </o:p>
Added connection 0. The Cache now contains 1 members <o:p> </o:p>
trying 10.30.80.9... <o:p> </o:p>
TCP_Nodelay set <o:p> </o:p>
STATE: CONNECT -> WAITCONNECT handle 0x6000704e0 line 1456 <connection #0> <o:p> </o:p>
Note: The URL https://80.231.132.40/ccm for real RTC server is actually a Natted IP. And port 443 is used instead 9443 by this URL. <o:p> </o:p>
I want to ask that whether my Squid.conf file is correct? <o:p> </o:p>
or I need to check for the correct URL? <o:p> </o:p>
Accepted answer
![](http://jazz.net/_images/myphoto/819a38f4408c701015ed42a5e5735936.jpg)
@Gaurav Verma, If you see either 40x or 302 as the response code when you run CURL, your proxy is working as expected. From your above output I see it not working correctly.
From the configuration, I see RTC is running on port 443, please confirm.
Below is the configuration from my working setup:
cache_replacement_policy heap GDSF
memory_replacement_policy heap GDSF
cache_dir aufs /var/cache/squid 10240 256 256
cache_mem 1024 MB
cache_store_log none
cache_peer rtcserver.com parent 9443 0 no-query originserver name=httpsAccel ssl login=PASSTHRU sslflags=DONT_VERIFY_PEER
cache_peer_access httpsAccel allow all
cachemgr_passwd disable all
coredump_dir /var/cache/squid
http_access allow all
https_port 443 cert=/etc/ssl/server.pem accel key=/etc/ssl/privkey.pem vhost
refresh_pattern . 0 20% 4320
maximum_object_size 5120 MB
maximum_object_size_in_memory 16 MB
buffered_logs on
visible_hostname squidproxyserver.com
access_log /var/log/squid/access.log squid
dns_nameservers ldap145.rtc.iot.ibm
hosts_file /etc/hosts
visible_hostname is set to localhost in your configuration, can you try by giving actual hostname.
If you are using WAS and non 9443 port for RTC server, check link - https://www-01.ibm.com/support/docview.wss?rs=3488&uid=swg21405179&cm_mc_uid=80353386661415096039333&cm_mc_sid_50200000=13646271529646197502
Comments
![](http://jazz.net/_images/myphoto/819a38f4408c701015ed42a5e5735936.jpg)
Hi Kamal
One other answer
![](http://jazz.net/_images/myphoto/819a38f4408c701015ed42a5e5735936.jpg)
When you say "they want all the clients from supplier site to connect with proxy server rather then real RTC server" you mean Squid proxy server right?
https://jazz.net/wiki/bin/view/Deployment/SquidProxyJazzSCMWindows details how to configure for Windows.
Are you able to open RTC URL https://80.231.143.40:443/ccm via browser from the machine where Squid is installed?
If you can reach from the Squid server machine, you should be able to reach RTC server via Squid as reverse proxy as well.
If you can't reach via browser, you should get this solved first.
Comments
![](http://jazz.net/_images/myphoto/819a38f4408c701015ed42a5e5735936.jpg)
@Kamal , thanks for the update. Below are my answers to you queries.