I have moved on a pace since my first message yesterday - thank you all who helped. I can now happily download files from clients on my isolated network, through my new proxy. #fanfare!!!!
However, I would really like to cache any file over 1 GB in size to disk, as the same file could get downloaded 100's of time a day by many different clients. The cache can purge/age out after a week or so, or when getting close to the 150 GB limit.
I have configured
cache_dir as below, but when I download a large 2 GB ISO file,
I do not see it being cached within the /var/spool/squid directory
structure and a subsequent download of the same file is no faster; so it is coming from Internet source.
My full /etc/squid/squid.conf file looks like this:
acl localnet src 0.0.0.1-0.255.255.255 # RFC 1122 "this" network (LAN)
acl localnet src 10.0.0.0/8 # RFC 1918 local private network (LAN)
acl localnet src 100.64.0.0/10 # RFC 6598 shared address space (CGN)
acl localnet src 169.254.0.0/16 # RFC 3927 link-local (directly plugged) machines
acl localnet src 172.16.0.0/12 # RFC 1918 local private network (LAN)
acl localnet src 192.168.0.0/16 # RFC 1918 local private network (LAN)
acl localnet src fc00::/7 # RFC 4193 local private network range
acl localnet src fe80::/10 # RFC 4291 link-local (directly plugged) machines
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
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access allow localnet
http_access deny to_localhost
http_access deny to_linklocal
include /etc/squid/conf.d/*.conf
http_access deny all
http_port 3128
coredump_dir /var/spool/squid
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern . 0 20% 4320
shutdown_lifetime 10 seconds
maximum_object_size 35 GB
cache_dir aufs /var/spool/squid 150000 16 256 min-size=1073741824
cache_mem 256 MB
maximum_object_size_in_memory 512 KB
cache_replacement_policy heap LFUDA
range_offset_limit -1
quick_abort_min -1 KB
I have plenty of disk space on my root partition:
Filesystem Size Used Avail Use% Mounted on
tmpfs 2.4G 1.2M 2.4G 1% /run
/dev/mapper/ubuntu--vg-ubuntu--lv 364G 8.3G 341G 3% /
tmpfs 12G 12K 12G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
/dev/sda2 974M 252M 656M 28% /boot
tmpfs 2.4G 4.0K 2.4G 1% /run/user/1000
I would really appreciate any pointers on what I am doing wrong?
This is a test setup for now; so if there are security/best practice concerns about my config, I would like to be aware; but I need to get it working for now.
Many Thanks
Pin
|
_______________________________________________ squid-users mailing list squid-users@xxxxxxxxxxxxxxxxxxxxx https://lists.squid-cache.org/listinfo/squid-users