Installing Squid
Created: 04/07/2008
General Information
A quick guide to get a squid Proxy Server running under OpenBSD.Requirements
Have a functioning OpenBSD installation. If you do, I assume you are somewhat familiar with the command line. I am using OpenBSD 4.2 currently, so if nothing else stops you, you should run the same.Installation
On OpenBSD I try to adhere to the suggestion to only use packages to install software. Most of the things I ever needed are available as packages. Get the Package Directory from one of the CDs if you bought the set. If not, go to www.openbsd.com and get the package directory from one of the mirrors. Additionally, please read http://www.openbsd.org/faq/faq15.html#PkgMgmt so you are also able to install directly from one of their mirrors.| # | pkg_add squid-2.6.STABLE13.tgz |
Configuration
Configuration files are placed in/etc/squid. Edit /etc/squid/squid.conf and adjust whatever you need, specifically you should have the following entries:|
http_port 3128 acl our_networks src 10.0.1.0/24 192.168.1.0/24 (change to your internal ip ranges) http_access allow our_networks cache_mem 32 MB (bumb it up if you have the RAM) maximum_object_size 20480 KB (adjust) cache_dir ufs /home/squid/cache 5000 16 256 (adjust the path) |
cache_dir ufs /home/squid/cache does indeed exist. Also, change its permissions so they are owned by the _squid user and group.| # | chown -R _squid:_squid /path |
| # | squid -z |
| # | squid |
/etc/rc.local:|
if [ -x /usr/local/sbin/squid ]; then echo -n ' squid'; /usr/local/sbin/squid fi |
Conclusion
This was a very simple guide to setup Squid. Squid has a gazillion configuration options and can be modified to suit almost any need or requirement. Don't stop now, keep reading the squid.conf file and make use of Google or else to find our more about Squid and how to tweak it to adjust it to your situation.This guide is © 2008 - 2010 overrider.
Author: overrider
overrider at overridersworld dot com