Created at:

Squid Notes

Basic setup under NetBSD

After installing squid from pkgsrc and copying the squid rc file to /etc/rc.d, I tried to run squid directly, but it didn't work. So I looked to the logs::

    # tail /var/squid/logs/cache.log

And found the following::

    2008/12/22 12:24:05| /var/squid/cache/00: (2) No such file or directory
    FATAL:  Failed to verify one of the swap directories, Check cache.log
        for details.  Run 'squid -z' to create swap directories
        if needed, or if running Squid for the first time.
    Squid Cache (Version 2.6.STABLE19): Terminated abnormally.
    CPU Usage: 0.033 seconds = 0.000 user + 0.033 sys
    Maximum Resident Size: 0 KB
    Page faults with physical i/o: 0

So I run the necessary command to make the cache::

    # squid -z

It yet complained that it couldn't resolve hostname. I added the following line to the /usr/pkg/etc/squid/squid.conf file::


It ran ok, but on the browser, I got the "Access denied" error. I was in a haste, so I couldn't work carefully on squid rules. So I just commented all lines which start with http_access in squid.conf and added one single line::

    http_access allow all

That was enough to make it work.

P.S.: If you is interesting about making a serious squid installation, it is better to worry about serious http_access rules and consider putting squid behind a firewall. Always see with netstat -anfinet if there is anyone trying to use your proxy for redirecting!