Author Topic: customizing squid  (Read 2827 times)

sixteenornumber

  • Guest
customizing squid
« on: December 09, 2012, 01:41:02 am »
:::EDIT:::
interesting fun fact, modifications to squid.conf reset back to the original setting after resetting http proxy.  /etc/init.d/squid3 restart seems to keep settings

:::/EDIT:::


I'm in the process of learning how to use zentyal.  The idea is to replace my curent ubuntu setup with it.  The following is a comparison of 2 different squid.conf files.  the first is the default conf from zentyal, the 2nd is from my ubuntu server which has a much much larger cache size (i think) and built in ad blocking and clam-av.  I really don't understand the zentyal .conf so I was afraid to mess with it too much.  has anyone manually configured their zentyal squid.conf?


Code: [Select]
http_port 3128 intercept
# END_TAG #

visible_hostname localhost
coredump_dir /var/spool/squid3
cache_effective_user proxy
cache_effective_group proxy
access_log /var/log/squid3/access.log squid
cache_log /var/log/squid3/cache.log
cache_store_log /var/log/squid3/store.log

pid_filename /var/run/squid3.pid

cache_peer localhost parent 3130 0 no-query proxy-only login=*:nopassword

auth_param basic realm Zentyal HTTP proxy
auth_param basic program /usr/lib/squid3/squid_ldap_auth -v 3 -b ou=Users,dc=zen
tyal-domain,dc=lan -u uid -p 390
acl_uses_indirect_client on
acl authorized proxy_auth REQUIRED

acl from_localhost src 127.0.0.0/8 ::1
acl to_localhost dst 127.0.0.0/8 ::1


http_access allow to_localhost
follow_x_forwarded_for allow from_localhost
forwarded_for on
log_uses_indirect_client on
always_direct allow to_localhost

# force clients to use squid-external
never_direct allow all







http_access allow  all


# default policy
# All acces denied by default if no other allow rule matchs
http_access deny all
# reply access allowed if not denied before
http_reply_access allow all

Code: [Select]
http_port 3128 transparent
acl LAN src 192.168.2.0/24
acl localnet src 127.0.0.1/255.255.255.255
acl remote src 202.60.90.148/255.255.255.255
# disable ads
acl ads dstdom_regex "/etc/squid3/ad_block"
http_access deny all ads
http_access allow LAN
http_access allow localnet
http_access allow remote
# this next line was added for clamav
# cache_peer 127.0.0.1 parent 8080 0 no-query no-diggest no-netdb-exchange defa
ult
cache_replacement_policy heap LFUDA
cache_dir ufs /var/spool/squid3 25000 16 256
maximum_object_size_in_memory 8192 KB
maximum_object_size 1048576 KB
« Last Edit: December 09, 2012, 02:13:02 am by sixteenornumber »

Sam Graf

  • Guest
Re: customizing squid
« Reply #1 on: December 09, 2012, 04:42:10 am »
Hi, and welcome!

Yes, Zentyal rewrites the configurations files of the services it manages on module or server restart. There is method for hooking custom configuration files into Zentyal, but that can come later.

Since you are learning Zentyal, my immediate interest is, are you sure you have to hand modify Zentyal to replicate the function of your current Ubuntu server?

sixteenornumber

  • Guest
Re: customizing squid
« Reply #2 on: December 09, 2012, 06:32:54 am »
Quote
...are you sure you have to hand modify Zentyal to replicate the function of your current Ubuntu server?

I do really like having the HUGE cache size. All i could find through the web interface was, "Cache files size (MB):" There was no way (that I know of) to set the max file size, max memory storage or max storage.

stuartiannaylor

  • Zen Monk
  • **
  • Posts: 67
  • Karma: +1/-6
    • View Profile
Re: customizing squid
« Reply #3 on: December 09, 2012, 02:14:59 pm »
Hi Zentyal is this great templating system that allows you to provide customization.

I would love to see the scripting engine refined to make it easier to provide zentyal variables and a little more documentation on how to employ them.

http://doc.zentyal.org/en/develop.html

Gives you a starting point but any Zentyal-Module can be customised also I think the hooks are upgrade independent so they will stay.


sixteenornumber

  • Guest
Re: customizing squid
« Reply #4 on: December 10, 2012, 06:07:44 am »
and it's in perl! excellent!!!

when I get everything all setup, i'll be sure to post everything here.  thanks