Install Squid in 600 seconds…

Currently I have a few firewall issues and while I am trying to resolve those issues. I decided I still needed to surf the internet. Till I can resolve my firewall issues, my option was to either surf with my mobile 3g unit, do my internet surfing only at work, or none at all. My other option was to install squid, as a bandaid issue.

The steps to get squid working is shown below.

# apt-add install squid3

We need to edit the squid configuration, before we can start the application.

# cd /etc/squid3
# cp squid.conf squid.conf.orig
# vi squid.conf

We now modify the squid configuration file, and modify, add the following into the squid.conf

acl our_networks src 192.168.0.0/24
acl localnet src 127.0.0.1/255.255.255.255
http_access allow our_networks
http_access allow localnet

An optional extra is if you want to modify the cache of squid the line that needs to be modified is

cache_dir ufs /var/spool/squid3 7000 16 256

The only part you may wish to modify is the 7000 which denotes the amount of megabytes. You can increase or decrease the size of your cache, depending on your needs.
Before you start squid you need to create the cache, with the following command.

# squid -z

You now can start squid with the command

# /etc/init.d/squid restart