RE: [squid-users] Random image generator w/ reverse-proxy

From: Keith M. Richard <krichard@dont-contact.us>
Date: Mon, 18 Feb 2008 16:31:47 -0600

To try and give a little more data to the original message, here is output from squidclient:

[root@my-server]# squidclient -r -v -p 8888 -m GET http://www.my-company.org/randomimages/servlet/org.groupbenefits.portal.RandomImageGenServlet?key=C72J9aHy%2BTw%3D%0D%0A"
headers: 'GET http://www.my-company.org/randomimages/servlet/org.groupbenefits.portal.RandomImageGenServlet?key=C72J9aHy%2BTw%3D%0D%0A HTTP/1.0
Pragma: no-cache
Accept: */*

'
HTTP/1.0 404 Not Found
Date: Mon, 18 Feb 2008 22:12:50 GMT
Server: Oracle HTTP Server Powered by Apache/1.3.19 (Win32) mod_plsql/3.0.9.8.5 mod_ssl/2.8.1 OpenSSL/0.9.5a mod_fastcgi/2.2.10 mod_oprocmgr/1.0 mod_perl/1.25
Content-Type: text/html; charset=iso-8859-1
X-Cache: MISS from www.my-company.org
X-Cache-Lookup: HIT from www.my-company.org:80
Via: 1.0 www.my-company.org:80 (squid/2.6.STABLE6)
Connection: close

<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<HTML><HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD><BODY>
<H1>Not Found</H1>
The requested URL /randomimages/servlet/org.groupbenefits.portal.RandomImageGenServlet was not found on this server.<P>
</BODY></HTML>
2008-02-18 16:12:49 [1]: 0.011 secs, 61.789773 KB/s (1KB)

Even though I have told the squidclient to use port 8888 it still goes over to port 80?

Also, I am using Squid Cache: Version 2.6.STABLE6 I plan to upgrade to the latest soon. If the latest version is what I need to fix this though, just say the word.

Thanks,
Keith
> All,
>
>             I have a web page on my site that has a randomly generated
> image (Alpha numeric picture) to allow users to register. I am using squid
> as an accelerator in my DMZ to this internal web server. Right now the
> image is coded as an unsecured (http) link/servlet on port 8888, which is
> just a random port. This is embedded in a HTTPS page. If I don't use squid
> it works but through squid if fails to display the image.
>             I have checked the firewall and it is properly configured.
> When I check the firewalls log, it shows the request to 8888 from the
> outside, but those same requests are never passed through squid for some
> reason. I have also run Wireshark on the squid server to capture the
> traffic as users made requests and I see the TCP [SYN] from the client to
> the squid servers IP address, but then the squid sends a TCP [RST, ACK].
> When I watch the same request being made from the squid server running
> FireFox to the internal web server it makes the handshake. I cannot figure
> out why the reset is happening.
> I modified the logformat so that I can get some readable data and
> this is what I get from the output:
>
> 18/Feb/2008:13:03:12 -0600 xxx.xxx.xxx.xxx:51651 192.168.0.135:8888
> TCP_MISS/404 697 GET http://www.my-
> company.org/randomimages/servlet/org.groupbenefits.por
> tal.RandomImageGenServlet? FIRST_UP_PARENT/192.1.0.59 text/html
>
> ******************************************************************
> # Basic config
> acl all src 0.0.0.0/0.0.0.0
> acl manager proto http cache_object
> acl localhost src 127.0.0.1/255.255.255.255
> acl to_localhost dst 127.0.0.0/8
> acl SSL_ports port 443
> acl Safe_ports port 80 # http
> acl Safe_ports port 21 # ftp
> acl Safe_ports port 443 # https
> acl Safe_ports port 70 # gopher
> acl Safe_ports port 210 # wais
> acl Safe_ports port 8080 # safe
> acl Safe_ports port 8888 # safe
> acl Safe_ports port 1025-65535 # unregistered ports
> acl Safe_ports port 280 # http-mgmt
> acl Safe_ports port 488 # gss-http
> acl Safe_ports port 591 # filemaker
> acl Safe_ports port 777 # multiling http
> acl CONNECT method CONNECT
>
> # Accelerator Mode
> http_port 80 defaultsite=www.my-company.org
> http_port 192.1.0.59:8888 defaultsite=www.my-company.org
> https_port 443 cert=/etc/squid/cert/portalcert.pem
> key=/etc/squid/cert/key.pem defaultsite=www.my-company.org
> cache_peer 192.1.0.59 parent 443 0 no-query originserver ssl login=PASS
> name=www.my-company.org
> cache_peer 192.1.0.59 parent 8888 0 no-query originserver
> visible_hostname www.my-company.org
> acl ourSite dstdomain www.my-company.org
> http_access allow ourSite
>
> # Log file and cache options
> logformat squid %tl %>a:%>p %la:%lp %Ss/%03Hs %<st %rm %ru %Sh/%<A %mt
> cache_dir ufs /var/cache/squid 100 16 256
> cache_swap_low 90
> cache_swap_high 95
> access_log /var/log/squid/access.log squid
> cache_log /var/log/squid/cache.log
> cache_store_log /var/log/squid/store.log
> pid_filename /var/spool/squid/squid.pid
>
> #Cache Manager settings
> http_access allow manager localhost
> http_access deny manager
> http_access deny all
> *******************************************************************
> Thanks,
> Keith
>
Received on Mon Feb 18 2008 - 15:31:53 MST

This archive was generated by hypermail pre-2.1.9 : Sat Mar 01 2008 - 12:00:05 MST