Squid Caching Web Proxy

Squid is the foundation of many other tasks that start with a proxy: It can act as a cache for improving web perfor- mance, it can hook into SquidGuard for content filtering, and its logs provide the basis for reporting on where users are going on the web.

Before anything else, the Squid package must be installed. Once installed, the package must be configured. The Squid configuration is broken up into several tabs. Before leaving a tab, click Save.

To start the configuration, navigate to Services > Squid Proxy Server. Configure the Squid settings as follows, starting with the General tab:

Enable Squid Proxy Checked

Keep Settings Checked

Proxy Interfaces LAN, loopback

Allow users on Interface Checked, so that LAN users will be allowed to use the proxy.

Transparent HTTP Proxy Checked, so client HTTP traffic will be intercepted.

Bypass proxy for Private Address Destination Checked, so that local and VPN traffic will bypass the proxy.

Bypass Proxy for these Source IPs If certain local client IP addresses need to bypass the proxy, put them in this box. Multiple addresses, networks, or alias names may be entered separated by a semicolon.

Bypass Proxy for these Destination IPs If certain remote servers need to bypass the proxy, put them in this box. Multiple addresses, networks, or alias names may be entered separated by a semicolon.

Enable Access Logging To enable web access reporting, check this box.

Visible Hostname Enter the hostname of the firewall as presented to clients in proxy error messages.

Administrator E-mail Enter a usable contact address. If a user encounters a proxy error, this will be shown to the user so they may contact the address for support.

Save settings, then change to the Local Cache tab and configure it as follows:

Hard Disk Cache Size Set this to a value that is reasonable for the available drive space and RAM. If running with /var in RAM, enter 0 here.

Hard Disk Cache System If running with /var in RAM, set this to null

Other parameters on this tab can be tweaked as needed to control the size of objects to be cached, how much memory can be used for caching, and other related settings. Save the settings before navigating away from the page.

If there are more local subnets behind a static route on the LAN, visit the Access Control tab and add them into the

Allowed Subnets list.

After these configuration steps have been completed, the proxy will be up and running. If transparent mode is in use, loading a proxy test site such as http://www.lagado.com/proxy-test will now reveal that the request was routed through a proxy.