Squid/Configure

From ImageStream Router Documentation

< Squid
Revision as of 15:49, 16 June 2009 by Syoder (Talk | contribs)
Jump to: navigation, search

ImageStream's Default Squid Configuration

ImageStream runs Squid in Forward Proxy mode listening on TCP port 3128. To use the Squid cache in this default mode configure your Web browser to access the Squid proxy at your router's IP on the default port 3128.

Simply start squid with the default configuration to use the Forward Proxy mode.

Transparent Proxy Configuration

Interception Caching goes under many names - Interception Caching, Transparent Proxying and Cache Redirection. Interception Caching is the process by which HTTP connections coming from remote clients are redirected to a cache server, without their knowledge or explicit configuration.

To configure squid for Transparent Proxy mode simply add the http_port 3129 transparent directive to your /etc/squid.conf file:

lab1:/usr/local/sand# pico /etc/squid.conf

Resulting file:

include /usr/local/squid/etc/squid.conf
http_port 3129 transparent
# Redirect all Web traffic coming in Ethernet0
iptables -t nat -A PREROUTING -p tcp -i Ethernet0 --dport 80 -j REDIRECT --to-port 3129

Squid default configuration

Running Squid

  • Start squid
lab1:/usr/local/sand# Start squid
Starting the Squid service...Adding user 'nobody' to the password file...
Adding user 'nobody' to the shadow file...
  Mounting add-on program partition read-write...  done.
  Mounting add-on program partition read-only...  done.
2009/06/16 14:45:00| Creating Swap Directories
2009/06/16 14:45:00| /usr/local/squid/var/cache exists
2009/06/16 14:45:00| Making directories in /usr/local/squid/var/cache/00
2009/06/16 14:45:00| Making directories in /usr/local/squid/var/cache/01
2009/06/16 14:45:00| Making directories in /usr/local/squid/var/cache/02
2009/06/16 14:45:00| Making directories in /usr/local/squid/var/cache/03
2009/06/16 14:45:00| Making directories in /usr/local/squid/var/cache/04
2009/06/16 14:45:00| Making directories in /usr/local/squid/var/cache/05
2009/06/16 14:45:00| Making directories in /usr/local/squid/var/cache/06
2009/06/16 14:45:00| Making directories in /usr/local/squid/var/cache/07
2009/06/16 14:45:01| Making directories in /usr/local/squid/var/cache/08
2009/06/16 14:45:01| Making directories in /usr/local/squid/var/cache/09
2009/06/16 14:45:02| Making directories in /usr/local/squid/var/cache/0A
2009/06/16 14:45:02| Making directories in /usr/local/squid/var/cache/0B
2009/06/16 14:45:02| Making directories in /usr/local/squid/var/cache/0C
2009/06/16 14:45:02| Making directories in /usr/local/squid/var/cache/0D
2009/06/16 14:45:04| Making directories in /usr/local/squid/var/cache/0E
2009/06/16 14:45:04| Making directories in /usr/local/squid/var/cache/0F
done.
Started FTP caching server...
Personal tools
Router software releases