Friday, July 5, 2013

Raspberry Pi Proxy Project

I'm a proud father of twin 8 month old girls. With fatherhood comes many, many fears, one of which is online safety. I was recently contemplating how (when the time comes) will I keep my girls safe from the dark areas of the internet. It was grounds for a proof of concept proxy, to at least understand what is possible, how easy is it to manage, and could it ultimately achieve a level of transparency between what my girls are doing online and what their parents are aware of.

Don't get me wrong, no acl can be a substitute for good parenting and an open, loving relationship between parents and their kids. But, I'm a child of the internet...and I can appreciate the value a proxy can bring the parents of connected children these days.

I'll be setting this up from a windows machine. There are a couple of things you'll need to get started:

I wrote the raspbian image to my SD card, booted up my rpi and performed the following:

Update repository and install squid:
$ sudo apt-get update
$ sudo apt-get install squid3

Modify squid configuration:
$ sudo vi /etc/squid3/squid.conf
Uncomment the following lines:
http_access allow localnet
acl localnet src

Restart squid service:
$ sudo service squid3 restart

Now I point my browser to 192.l68.1.5 on port 3128 (default squid port) and I'm now running through my pi proxy. To confirm this is working you can tail the access log like so:

$ sudo tail -f /var/log/squid3/access.log

All in all very easy to setup to this basic level. Next I'd like to play around with turning this into a transparent proxy, and generating decent reporting.