Re: [squid-users] squid ver 3 ssl cache proxy

From: Chris Robertson <crobertson@dont-contact.us>
Date: Wed, 13 Feb 2008 16:32:19 -0900

Tomer Brand wrote:
> Hi,
>
> I am trying to configure squid 3 to function as ssl cache proxy.
> My current status:
> 1. SQUID receives HTTPS requests
> 2. Performs ssl termination and download the data via HTTP from my back
> end server
> 3. The data is store in the cache directory
>
> The second time i am asking for the same file squid deletes the file
> exist in the cache and download it again from the back end server.
>
> bellow is my squid.conf file. Can any1 tell me what i missed?
>
> acl manager proto cache_object
> acl localhost src 127.0.0.1/32
> acl localhostdomain src 10.10.10.10
> acl to_localhost dst 127.0.0.0/8
> acl localnet src 10.0.0.0/8 # RFC1918 possible internal network
> acl localnet src 172.16.0.0/12 # RFC1918 possible internal network
> acl localnet src 192.168.0.0/16 # RFC1918 possible internal network
> 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 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 Safe_ports port 6666 # SQIOD port
> acl CONNECT method CONNECT
> http_access allow manager localhost
> http_access deny manager
> http_access deny !Safe_ports
> http_access deny CONNECT !SSL_ports
> http_access allow localnet
> http_access allow all
>
Hmmm. Perhaps it would be better to make an acl like...

acl myHost dst 10.10.10.10

...and then instead of "http_access allow all" use "http_access allow
myHost". Maybe using vhost and vport doesn't open you to abuse when you
have a cache_peer with the originserver directive, but it sure makes me
nervous...
> icp_access allow localnet
> icp_access deny all
> htcp_access allow localnet
> htcp_access deny all
> https_port 4444 vhost vport cert=/home/tomer/Desktop/certificate.pem
> key=/home/tomer/Desktop/key.pem
> http_port 6666 vhost vport
> cache_peer 10.10.10.10 parent 8050 0 originserver default login=PASS
> cache_dir ufs /usr/local/squid/var/cache 100 16 256
> maximum_object_size 2097000 KB # A bit below 2 GB - SQUID maximum file
> size
>

Laughable, considering you have a 100 MB cache partition. :o)

> hierarchy_stoplist cgi-bin ?
> access_log /usr/local/squid/var/logs/access.log squid
> acl QUERY urlpath_regex cgi-bin \?
> cache deny QUERY
> refresh_pattern ^ftp: 1440 20% 10080
> refresh_pattern ^gopher: 1440 0% 1440
> refresh_pattern . 0 20% 4320
> icp_port 3130
> coredump_dir /usr/local/squid/var/cache
> visible_hostname ubuntu
>

I see you have further information in another email...

Chris
Received on Wed Feb 13 2008 - 18:32:27 MST

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