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

96 Comments

View All Comments

  • Lio - Saturday, May 15, 2010 - link

    Would be interesting to have some focus on cost of running this setup. Linux may be free but running a machine 24 hours a day to provide a proxy service is not. Older hardware such as that based on Intel's Pentium 4 chips are famous for high power consumption, I wonder what the additional charge on the power bill would be after one year. Is there anything that can be done to reduce the operating cost of such a set up via software which supports some kind of sleep mode?
  • pkoi - Sunday, May 16, 2010 - link

    One way to curb power consumption is to do meaningful computation on idle time 24/7.
    BOINC ect. And run linux in a VM.
  • RoboJ1M - Sunday, May 16, 2010 - link

    Hi,

    A bit late in the day but I'd like to point everybody's attention to "eBox", a web based configurator for linux based server.

    It combines the ease of use of the "home router" with the tremendous power of the linux server and I absolutely love it.

    We use two of them at work for proxy, firewall and vpn duties and I use one at home for all of the above and domain, print and file services.

    For reference it's based on ubuntu server (8.04 LTS at the mo but 10.04 coming soon)

    Anyway, I absolutely love it. :)

    J.
  • zabby113 - Monday, May 17, 2010 - link

    Does the proxy take over as your router? Since it leases your IP from the Modem, is this not where port forwarded and such should take place? If so, how does one perform such tasks? If not, can anyone explain to me what is happening?
  • Fineghal - Monday, May 17, 2010 - link

    This seems like the perfect task for a "plug" computer ala GuruPlug. 2Gb Ethernet, 1 eSata, 2 usb and b/g wireless. 130 USD or so - if you want to do this, the power savings of 5 watts vs 100 watts comes close to paying for itself in a year. Obligatory link: http://www.globalscaletechnologies.com/p-32-gurupl...
  • jtleon - Tuesday, July 20, 2010 - link

    I realize Anandtech probably will not touch this subject - but lets face it - Ads eat up bandwidth. More than we may EVER want to admit.

    Using a proxy that has filtering built-in, like CCProxy, can GREATLY eliminate all those hungry Ads, and save that precious bandwidth for what you REALLY need it for - Useful data, of course!

    We use CCProxy both at work, and at home, and build our webfilter using the updated host file from:

    http://www.mvps.org/winhelp2002/hosts.htm

    This way not only do we eliminate redundant downloads, but we stop the Ads - before they hit the router! Talk about truly efficient bandwidth!!!

    jtleon

Log in

Don't have an account? Sign up now