Introduction to Proxy Servers

Do you have a growing family at home slowly eating away at your bandwidth? Maybe you're a web surfing fanatic looking for a little more speed? If you answered yes to either, a caching proxy is for you. This simple addition to your home network can provide you with additional bandwidth by reducing common internet bandwidth usage. Normally these types of proxies are found in the commercial world, but they're just as useful at home. Below is an image of a traditional multi-computer home network.

Traditional Home Network

So what is a caching proxy server? The concept is pretty simple: when a request is made to a website, that content is then saved locally on the local caching proxy server. When another request for the same data is made by any machine on your network, that data is retrieved from your local proxy rather than the internet. The content can be anything from regular website content to a file you downloaded. For those with multiple computers in a single household, the bandwidth savings really adds up with patches and multi computer driver updates. The change to the network configuration is really quite small:

Home Network with Proxy Server

At this point many are likely asking how much this costs. If you read my previous article, you would know the answer right away: "It's free and it's on Linux". I suppose I need to preface that last comment with the qualification that you need some old "junky but functional" hardware lying around. There are many different Linux solutions we can deploy to achieve this goal. For this article I have chosen a solution of Arch Linux, Shorewall, and Squid.

We selected Arch Linux because it is a rolling release and has the latest and greatest packages. If you are not familiar with the phrase "rolling release", in Linux it indicated a distribution that keeps you up-to-date with the latest software updates via the package manager. You will never have to re-install or upgrade your server from one release version to the next with this style of distribution. The great part about a rolling release on a proxy/firewall setup is that once it's set up and working correctly, you will not have to go back and completely overhaul the server when a newer distribution update comes out.

Along with the different types of OS and application solutions, there are also multiple ways to set up a caching proxy. My preferred setup is a transparent caching proxy. A transparent proxy does not require you to make any additional changes to the client computers on your network. You utilize the proxy server as your home gateway, allowing the proxy server to automatically forward the ports to Squid. The second way to utilize Squid would be to set up your client machines to utilize the proxy server via the proxy settings in your browser. Although this may be the easiest way to set up a proxy server, it requires you to make changes for any machine that attaches to your network. The table below shows what I selected for my transparent caching proxy server.

Test Proxy System
Component Description
Processor Intel Pentium 4 3.06GHz
(3.06GHz, 130nm, 512K cache, Single-core + Hyper-Threading, 70W)
Memory 2x256MB PC800 RDRAM
Motherboard Asus P4T
Hard Drives 120GB Western Digital SATA
Video Card ATI Radeon 7000
Operating Systems Arch Linux (32-bit)
Network Cards Onboard Intel Gigabit
PCI 100Mbit 3Com 3c905C-TX

I could have selected older equipment, but this is what I had laying around the house. As seen in the table, one of the hardware requirements for a transparent proxy is to have two network cards or a dual port network card. We recommend against using wireless for either of the connections to the proxy server, and a Gigabit Ethernet connection from the proxy to the rest of the network is ideal. (The connection to your broadband link can be 100Mbit without imposing any bottleneck.) Another quick suggestion: If you download a fair amount of files, it may be a wise idea to utilize at least a 120GB HDD. The idea is that the more space you have, the longer you can keep your files stored on your proxy server. With storage being so cheap, you could easily add a 500GB or larger drive for under $100.

Now that we have our hardware and a good idea what we want to set up, it's time to get installing. I'll try to keep this portion simple and to the point, although if you have questions later feel free to post a comment.

Proxy Server How To
Comments Locked


View All Comments

  • mindless1 - Tuesday, May 11, 2010 - link

    Given a motherboard with the features needed, you can underclock most system configurations to reach a power level similar enough to an Atom or Notebook... especially if the Atom system is using the relatively power hungry (for its feature set) 945 chipset.

    For example, take what many call a power hungry setup like an Athlon XP @ 60W peak load. Undervolt and underclock to 1/4th it's original speed and you still get enough performance for most people's needs, but only 15W at peak power. Now consider that it is hardly ever running at peak power, that the power savings is a single-digit # of watts at most. Only catch is, some motherboards limit how low you can undervolt, the above example only assumed power savings from running at 1/4th clock frequency but if you can undervolt too, the power savings go up even more.
  • MySchizoBuddy - Tuesday, May 11, 2010 - link

    can i use sheevaplug as my cache proxy
  • MySchizoBuddy - Tuesday, May 11, 2010 - link

    OK it can
    From SheevaPlug FAQ
    Sheevaplug can be used for
    "Web proxy, enabling fast, cached access to your favorite web sites"
  • ibloomfield - Tuesday, May 11, 2010 - link

    i use squid for the sole reason of working my way around filters at school.

    if you set up ssh to work off port 443 (in case outgoing 22 is blocked) and then tunnel squids port through the connection (port 3128) then you can set the browser to proxy port 3128 and your are set to go.

    easy workaround
  • Pinski - Tuesday, May 11, 2010 - link

    Or you can just use ssh -D localhost:### host, and you'll setup a SOCKS proxy via SSH and use that to browse the web without ever having to deal with configuring/running Squid.
  • Pinski - Tuesday, May 11, 2010 - link

    Woops, forgot ### would be a port number of your choosing.
  • mfenn - Tuesday, May 11, 2010 - link

    Should say /etc/resolv.conf instead of /etc/resolve.conf
  • JarredWalton - Tuesday, May 11, 2010 - link

    Fixed... I blame *nix and their fetish for dropping letters. LOL.
  • bob4432 - Tuesday, May 11, 2010 - link

    " I set my maximum size to 2048MB in order to retain everything up to a CD ISO"

    am i reading this wrong? what cd iso is 2GB in size? why not set it too 700MB or 4.7GB? or even 8.5GB for a d/l dvd?
  • RamarC - Tuesday, May 11, 2010 - link

    you post a great little article! keep it up since there doesn't seem to be anything new/big/amazing on the hardware front. ;)

Log in

Don't have an account? Sign up now