lost and found ( for me ? )

Ubuntu 13.10: install and configure squid3

Here are logs when installing squid3 on Ubuntu 13.10.


# tail -1 /etc/lsb-release ;uname -ri
3.11.0-18-generic x86_64

install squid3
# apt-get install squid3

# squid3 -version
Squid Cache: Version 3.3.8

no cache, allow from
# grep -v ^# squid.conf | grep -v ^$
acl localnet src
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 localnet
http_access allow localhost manager
http_access deny manager
http_access allow localhost
http_access deny all
http_port 3128
coredump_dir /var/spool/squid3
refresh_pattern ^ftp: 1440 20% 10080
refresh_pattern ^gopher: 1440 0% 1440
refresh_pattern -i (/cgi-bin/|\?) 0 0% 0
refresh_pattern (Release|Packages(.gz)*)$      0       20%     2880
refresh_pattern . 0 20% 4320

start squid. By default squid listens to TCP 3128.
# service squid3 restart
squid3 stop/waiting
squid3 start/running, process 1559

# lsof -ni:3128
squid3  1559 proxy    9u  IPv6  10525      0t0  TCP *:3128 (LISTEN)

send HTTP requests to the squid from a client.
# curl --proxy http://www.google.com

HTTP headers from the client to the squid.
   Source port: 38185 (38185)
   Destination port: ndl-aas (3128)

Hypertext Transfer Protocol
   GET http://www.google.com/ HTTP/1.1\r\n
       [Expert Info (Chat/Sequence): GET http://www.google.com/ HTTP/1.1\r\n]
           [Message: GET http://www.google.com/ HTTP/1.1\r\n]
           [Severity level: Chat]
           [Group: Sequence]
       Request Method: GET
       Request URI: http://www.google.com/
       Request Version: HTTP/1.1
   User-Agent: curl/7.32.0\r\n
   Host: www.google.com\r\n
   Accept: */*\r\n
   Proxy-Connection: Keep-Alive\r\n
   [Full request URI: http://www.google.comhttp://www.google.com/]
   [HTTP request 1/1]

proxy to the web site.
Hypertext Transfer Protocol
   GET / HTTP/1.1\r\n
       [Expert Info (Chat/Sequence): GET / HTTP/1.1\r\n]
           [Message: GET / HTTP/1.1\r\n]
           [Severity level: Chat]
           [Group: Sequence]
       Request Method: GET
       Request URI: /
       Request Version: HTTP/1.1
   User-Agent: curl/7.32.0\r\n
   Host: www.google.com\r\n
   Accept: */*\r\n
   Via: 1.1 ubuntu (squid/3.3.8)\r\n
   Cache-Control: max-age=259200\r\n
   Connection: keep-alive\r\n

squid logs.
# less /var/log/squid3/
access.log  cache.log  

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.