0% found this document useful (0 votes)
160 views3 pages

Squid Proxy Server Centos 5.3

This document contains configuration settings for the Squid Proxy Server on a Centos 5.3 system. It lists the installed Squid version and modifies several cache, log file, and access control settings including increasing the cache size to 600MB and cache directory size. IPtables rules are added to redirect port 80 traffic to the Squid proxy port 3128. The full Squid configuration file is output without comment lines, setting access controls and other parameters.

Uploaded by

Azaj Ikbal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
160 views3 pages

Squid Proxy Server Centos 5.3

This document contains configuration settings for the Squid Proxy Server on a Centos 5.3 system. It lists the installed Squid version and modifies several cache, log file, and access control settings including increasing the cache size to 600MB and cache directory size. IPtables rules are added to redirect port 80 traffic to the Squid proxy port 3128. The full Squid configuration file is output without comment lines, setting access controls and other parameters.

Uploaded by

Azaj Ikbal
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 3

Squid Proxy Server (Centos 5.

3)
root@ns1# rpm -qa --last | grep squid
squid-2.6.STABLE21-6.el5
# cache_mem 8 MB ---------------------------------------------Line 1580
cache_mem 600 MB
# maximum_object_size_in_memory 8 KB -------------- Line 1598
maximum_object_size_in_memory 8 KB
# cache_dir ufs /var/spool/squid 100 16 256
------------------- Line 1786
cache_dir ufs /var/spool/squid 100 32 512
# maximum_object_size 4096 KB
------------------------------ Line 1828
maximum_object_size 4096 KB
# cache_swap_low 90 -------------------------------------------------- Line 1845
cache_swap_low 90
# cache_swap_high 95
cache_swap_high 95
#access_log /var/log/squid/access.log squid ------------------ Linie 1953
access_log /var/log/squid/access.log squid
# cache_log /var/log/squid/cache.log ------------------------- Line 1969
cache_log /var/log/squid/cache.log
# cache_store_log /var/log/squid/store.log ------------------ Line 1980
cache_store_log /var/log/squid/store.log
# client_netmask 255.255.255.255 ----------------------------------- Line 2123
client_netmask 255.255.255.255
# cache_effective_user squid
cache_effective_user squid

---------------------------------- Line 2984

# cache_effective_group squid
-------------------------------- Line 2998
cache_effective_group squid

[root@web ~]# iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j


REDIRE CT --to-port 3128

[root@web ~]# grep -v "^#" /etc/squid/squid.conf | sed -e '/^$/d' | more


[root@web ~]# cat /etc/squid/squid.conf | sed '/ *#/d; /^ *$/d'
Output:
hierarchy_stoplist cgi-bin ?
acl QUERY urlpath_regex cgi-bin \?
no_cache deny QUERY
hosts_file /etc/hosts
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern . 0 20% 4320
acl all src 0.0.0.0/0.0.0.0
acl manager proto cache_object
acl localhost src 127.0.0.1/255.255.255.255
acl to_localhost dst 127.0.0.0/8
acl purge method PURGE
acl CONNECT method CONNECT
cache_mem 1024 MB
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
acl lan src 192.168.1.1 192.168.2.0/24
http_access allow localhost
http_access allow lan
http_access deny all
http_reply_access allow all
icp_access allow all
visible_hostname myclient.hostname.com
httpd_accel_host virtual
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header on
coredump_dir /var/spool/squid

You might also like