Install Squid Proxy on Ubuntu Server Ubuntu 10.04.3 LTS

I decided that I need the ability to host a proxy server on my own network to see what the internet looked like from my house when I was at work.

I tired to setup an Apache forward proxy using mod_proxy, but had issues with SSL requests not working correctly. I have used a squid proxy on my home network for local caching via my firewall machine for years. Squid has always been reliable.

The process to install squid is quite simple in Ubuntu lucid:
  1. Open a terminal or SSH into your lucid Ubuntu Server.
  2. Install squid proxy using apt-get at the command line.
  3. sudo apt-get install squid
  4. Edit the configuration file. The configuration file for squid is huge. It's a very configurable proxy. I decided to make a backup, just in case I messed something up in the configuration.
  5. sudo cp /etc/squid/squid.conf etc/squid/squid.conf.original
  6. Use nano (my favorite command line editor) to edit the configuration file.  Understanding what I needed for a simple http proxy, I needed to make only make one edit and two additions to the default configuration file that Ubuntu provided.
  7. sudo nano /etc/squid/squid.conf
  8. Edited the default port from 3128 to 8001 (my preference).
  9. http_port 8001
  10. Added two lines to configure the ACL rules to allow connections from two specific networks.
  11. acl localnet src 192.168.0.0/16 # RFC1918 possible internal network acl outside src 22.33.189.0/16       # RFC1918 outside network
  12. Added two lines to allow http access by those two networks.
  13. http_access allow localnet
    http_access allow outside
  14. Start up squid service.
  15. sudo service squid start
The trickiest part is defining the allowed networks in one line and then configuring squid to allow http access to those networks.

Went and changed one of my browsers to use the proxy on port 8001 and everything worked great. SSL worked perfectly transparent as I expected. Not sure why Apache didn't work, but I like the separation of the two applications.

Squid seems infinitely configurable and very full featured. Perhaps when I get more time I'll play with it more. The log files are stored in /var/log/squid/.

Comments

Popular posts from this blog

Moen 1225 Kitchen Faucet Cartridge Repair or Replacement

Outdoor Temperature - Waiting for Update Honeywell WiFI Thermostat (RTH9580WF)

Comcast Xfinity HD uDTA Pace DC60Xu Unboxing and Setup Instructions