Sunday, April 30, 2006

Squid Caching

I've finally set up squid caching on my server. After trying to set it up for my dialup connection five years ago and failing miserably I pretty much put squid to the wayside. I've never considered myself paranoid enough to want to tunnel all my traffic over a secure connection but living in a house with curious networking/security geeks makes me a bit nervous so I set up squid on joelapenna.com. Right now its not opimized to do anything special aside from do some basic adblocking and to get it that way was amazingly simple especially compared to when I last tried setting squid up so long ago.

  1. (on server) apt-get install squid
  2. (on client) ssh joelapenna.com -L 8888:localhost 3128
  3. Works now. The end!
  4. Adblocking (optional! but recommended)
    1. add to crontab
      10 * * * * wget -O /etc/squid/adservers 'http://pgl.yoyo.org/adservers/serverlist.php?hostformat=squid-dstdom-regex&showintro=0&startdate%5Bday%5D=&startdate%5Bmonth%5D=&startdate%5Byear%5D='
      
    2. edit /etc/squid/squid.conf to do some adblocking:
      acl ads dstdom_regex -i "/etc/squid.adservers"
      http_access deny ads
      
  5. All done!