Pour squid.conf
auth_param basic program /usr/lib64/squid/ncsa_auth /etc/squid/users
auth_param basic children 5
auth_param basic realm Squid proxy-caching web server
auth_param basic credentialsttl 2 hours
acl authentification proxy_auth REQUIRED
http_access allow authentification
authenticate_ip_ttl 60 seconds
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 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 CONNECT method CONNECT
acl esic src 192.168.0.0/255.255.255.0
http_access allow manager localhost
http_access allow esic
http_access allow localhost
http_access deny manager
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access deny all
icp_access allow all
http_port 3128 transparent
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log
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
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
cache_effective_user squid
coredump_dir /var/spool/squid
cache_effective_group squid
redirect_program /usr/bin/squidGuard -c /etc/squid/squidGuard.conf
pour iptables
iptables -t nat -F PREROUTING
iptables -t nat -A PREROUTING -i eth1 -p tcp --dport 80 -j REDIRECT --to-port 3128
Voila :roll: l'erreur
ERROR
The requested URL could not be retrieved
While trying to process the request:
GET / HTTP/1.1
Host:
www.google.fr
User-Agent: Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.8.0.7) Gecko/20061011 Fedora/1.5.0.7-7.fc6 Firefox/1.5.0.7
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Cookie: PREF=ID=8a8956228f5e61bd:TM=1217852289:LM=1217852289:S=OV7DW4xRdUOwmUqR; NID=13=bRMtscDjzIRtlasi13ff0SeOBFRbElGbQY2NEq6XmfRybjyUHLhjCbNZN6_CEL1flPD2OuhBlyUrJYwaMIAAfjX_QinRM3GOqI-EysRjPE1Fs9xg9Lx4mINrpkaiDC7X
The following error was encountered:
* Invalid Request
Some aspect of the HTTP Request is invalid. Possible problems:
* Missing or unknown request method
* Missing URL
* Missing HTTP Identifier (HTTP/1.0)
* Request is too large
* Content-Length missing for POST or PUT requests
* Illegal character in hostname; underscores are not allowed
Your cache administrator is root.
Generated Thu, 07 Aug 2008 12:49:31 GMT by localhost.localdomain (squid/2.6.STABLE19)