Home cache/proxy etc Discussion

Soldato
Joined
24 Apr 2013
Posts
3,067
Hi,

I am bored and want to fiddle around with stuff. Pretty much.

I have 2x HP microservers. 1 is used as a HTPC and NAS and the other runs WinServer 2008 R2 with HyperV - to which I have created a VM running Linux Mint 15 just because I fancied seeing what Mint was like. Now I fancy configuring Mint as a web/proxy server and I am just at the planning stage to make a start on a little project to get an idea I have in my head all up and running. Just looking for some thoughts/advice/feedback to perhaps make me think differently from different points of view which I am probably overlooking or could be doing better.

I want to direct all clients on my network (my PC, my HTPC, GF's laptop, my laptop) via my Mint webserver. I'd like to direct all web browsing traffic via Squid but I would like to be able to switch profile or change proxy settings in client browsers manually to direct through TOR completely if I feel the need. Also, I would like to use Privoxy to do this so allthough normal traffic being directed to Squid then to the web, certain URL's I specify should always be directed through TOR even without changing profile/proxy settings. Does this all sound possible and reasonable?

My main worry is my network layout. I have my 2 servers and my PC cabled to gigabit switch which then goes to my router and to the outside world. Whereas laptops access the router directly over wireless. Is it possible to route the laptop data back through the switch to my VM running on the cabled server, then back to switch/router>outside world. Is this stupid?

I am literally just thinking out loud, via keyboard, here. So any input or examples of what you have at home if similar would be great. Just tryingt o get some creative juices flowing in my brain and learn something new along the way by configuring some new toys. Thanks :D

And edit - Another thought being how should I divvy up the rols here. Privoxy and Squid running on 2 seperate VM's on my host maybe. Guess TOR could run on either? Could it all run from a single VM?
 
Last edited:
Normal convention for a proxied service like this would be to have an internal interface connected to your private network and an external interface connected to your internet facing network. With your wireless clients connected directly to your ADSL(?) router/modem this isn't going to be possible unless it supports vlans along with your switch.

I'm not familiar with software you're planning to use but I don't see any reason why you couldn't have it all connected to a single switch. Given the low number of client devices you are connecting traffic congestion is unlikely to be a problem.
 
Last edited:
I got this up and running pretty easily in the end with no headaches.

1 VM running Privoxy & Tor.
1 VM running Squid.

Privoxy is first in the chain and it is set to route all HTTP traffic to the Squid proxy then to the big bad internet. However, Privoxy also configured so that certain specific URL's I have included in the config will route via Socks5 to TOR running on the same host.

Squid config I am still tinkering with as it is massive but the major work I have done in there is with headers. All the usual work, only problem I had was trying to change my reply user-agent header. I for the life of me couldn't get it to work at all but then realised sites were just pulling this from JS which I had running in my browser, WOOPS haha.

Apart form that it all seems smooth. My GF has not complained about anything yet and she even said pages seem to load a bit quicker but I haven't tried to explain a caching proxy server to her as that would end in tears.

It's also a simple proxy server IP change in my browser settings and I can be browsing completely via Privoxy>TOR if needs be. So all in all this is a very simple little setup that lets you get passed BS ISP blocks, cache for performance gains and also to remove headers to try to at least protect your privacy online (when accompanied by varios browser addons you'll be aware of). Plus it's good fun to learn and play :)

If anyone wants specifics and is interested in doing similar feel free to let me know. I could maybe do a tutorial or something if there was any interest from people. The main interest for people will most likely be the ability to set this all up and then leave it and get around all those pesky barriers put in your way with browsing the www.
 
Back
Top Bottom