Author Topic: [SOLVED]Squid as reverse proxy  (Read 3703 times)

Vertex

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
[SOLVED]Squid as reverse proxy
« on: October 17, 2010, 01:52:13 pm »
Zentayl 2.x came with the caching Proxy Squid - i want to use squid as caching proxy for the local lan and as reverse proxy for the wan(internet) - its not a big deal, but every time i restart the proxy with the zentyal webgui all my changes in the squid.cfg will be wiped out. What can I do to prevent this behaviour - without braking the zentyal configuration ? Maybe it would be a good idea to enhance the functionality of zentyal with posibility to run a reverse proxy too ?!
« Last Edit: October 17, 2010, 11:09:42 pm by Vertex »

FutureTechSys

  • Zen Warrior
  • ***
  • Posts: 163
  • Karma: +0/-0
    • View Profile
    • Future Tech Systems, LLC
Re: Squid as reverse proxy
« Reply #1 on: October 17, 2010, 08:31:06 pm »
There's a catalog update command - which I don't know, honestly, but I had the same thing with my interfaces file getting wiped out.

What would be great is if we could get a FAQ for Zen 2.0 that lists all the catalog file update commands for the various pieces people edit manually!
Future Tech Systems, LLC
http://www.FutureTechSys.com

See our Zazen servers running Zentyal!
http://www.futuretechsys.com/small-biz/

SpiderOak online backup - 2GB Free!
https://spideroak.com/download/promo/fts

Vertex

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: Squid as reverse proxy
« Reply #2 on: October 17, 2010, 10:59:41 pm »
Thanks for the hint, I solved the problem by editing the template file for squid. The location of the templates can be found here
« Last Edit: October 17, 2010, 11:08:00 pm by Vertex »

christian

  • Guest
Re: [SOLVED]Squid as reverse proxy
« Reply #3 on: October 18, 2010, 09:55:33 am »
Zentayl 2.x came with the caching Proxy Squid - i want to use squid as caching proxy for the local lan and as reverse proxy for the wan(internet)

Unless I'm wrong, meaning of "reverse proxy" is not to act as a proxy relaying your HTTP request to internet. This is what a basic proxy does.
Thus if I rephrase your request, you would like to use Squid as proxy cache for intranet and proxy (with cache too?) for internet. Am I correct? If yes, why does it required template changes?

Reverse proxy is somewhat different: this configuration allows hiding all your web servers behind proxy server that will redirect all users request toward the right server while exposing only one IP to internet (or internally in case you have internal reverse proxy).

It is not very different from standard proxy but I would say that proxy deals with outgoing requests while reverse proxy deals with incoming requests.

So, is it really "reverse proxy" that you need to configure?

Vertex

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: [SOLVED]Squid as reverse proxy
« Reply #4 on: October 18, 2010, 01:16:43 pm »
You are absolutly right, I want to use squid as reverse (for incoming internet traffic) AND as normal caching proxy for my LAN. When I read your reply I thought about the config issue again - maybe reverse proxy doesn`t require any changes, because of the right default parameters but i was unsure so I set some parameters which were not part of the standard zentyal config.

christian

  • Guest
Re: [SOLVED]Squid as reverse proxy
« Reply #5 on: October 19, 2010, 10:39:44 am »
I never tryed to achieve it but I would be surprised if current Zentyal configuration allows Squid to act as reverse proy. In such case, you might have to modify (and maintain each time there is an update) stubs. I'll rather let Zentyal team react on this.

This said, is Squid the best tool to achieve it? For what I understand you will not get flexibilty one may get with solution like Nginx (e.g.). However, this really depends on your needs in term of redirection, access control, load balancing etc...

Vertex

  • Zen Apprentice
  • *
  • Posts: 8
  • Karma: +0/-0
    • View Profile
Re: [SOLVED]Squid as reverse proxy
« Reply #6 on: October 19, 2010, 07:31:16 pm »
In my case it's just for personal use, so squid is ok I think. The only reason for me to use squid as reverse proxy is security. Nevertheless it would be an interesting new feature for zentyal I think.