Re: [squid-users] Re: Configuring Squid LDAP Authentication

2012-01-11 Thread James Robertson
 I came across this configuration online, but it still doesn't work.  I
 really thought I would of had it on this one, but still not go.

 acl lan src 192.168.1.0/25
 acl Intranet dstdomain intranet.int
 acl lan-intranet dst 192.168.2.2
 http_access allow lan
 http_access allow Intranet
 http_access allow lan-intranet

You need to post your full squid.conf.


Re: [squid-users] Re: Configuring Squid LDAP Authentication

2012-01-11 Thread James Robertson
 My configuration shown below -

To make it easier to view, can you please run this command to remove
the spaces and comments.

grep -v -e '^$' -e '#'  /etc/squid/squid.conf


Re: [squid-users] Re: Configuring Squid LDAP Authentication

2012-01-11 Thread berry guru
That is an awesome command to know!  I definitely need to remember
that command.  Here is my cleaned up configuration -

auth_param basic program /usr/lib/squid/ldap_auth -R -b
dc=cyberdyne,dc=local -D
cn=Administrator,cn=users,dc=cyberdyne,dc=local -w passwordhere -f
sAMAccountName=%s -h 192.168.100.237
auth_param basic children 5
auth_param basic realm CYBERDYNE.LOCAL
auth_param basic credentialsttl 5 minutes
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl purge method PURGE
acl CONNECT method CONNECT
acl intranet dstdomain cyberdyne-intranet
acl lan-intranet dst 192.168.100.222
http_access allow intranet
acl block_websites dstdomain .facebook.com .myspace.com .twitter.com .hulu.com
http_access deny block_websites
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access allow all
icp_access allow localnet
icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log squid
 debug_options ALL,0,1,34,78
  TAG: log_fqdn on
refresh_pattern ^ftp:   144020% 10080
refresh_pattern ^gopher:14400%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$   0   20% 2880
refresh_pattern .   0   20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
visible_hostname Squid
dns_defnames on
  TAG: dns_nameservers
hosts_file /etc/hosts
coredump_dir /var/spool/squid

On Wed, Jan 11, 2012 at 5:25 PM, James Robertson j...@mesrobertson.com wrote:
 My configuration shown below -

 To make it easier to view, can you please run this command to remove
 the spaces and comments.

 grep -v -e '^$' -e '#'  /etc/squid/squid.conf


Re: [squid-users] Re: Configuring Squid LDAP Authentication

2012-01-11 Thread Amos Jeffries

On 12.01.2012 14:32, berry guru wrote:

That is an awesome command to know!  I definitely need to remember
that command.  Here is my cleaned up configuration -

auth_param basic program /usr/lib/squid/ldap_auth -R -b
dc=cyberdyne,dc=local -D
cn=Administrator,cn=users,dc=cyberdyne,dc=local -w passwordhere 
-f

sAMAccountName=%s -h 192.168.100.237


That should be a single line. Is it actually spread over multiple in 
your squid.conf? that may be the problem right there.



auth_param basic children 5
auth_param basic realm CYBERDYNE.LOCAL
auth_param basic credentialsttl 5 minutes
acl all src all
acl manager proto cache_object
acl localhost src 127.0.0.1/32
acl to_localhost dst 127.0.0.0/8 0.0.0.0/32
acl purge method PURGE
acl CONNECT method CONNECT
acl intranet dstdomain cyberdyne-intranet


The above will only match invalid URLs which start with 
http://cyberdyne-intranet/;. If the client does the right thing and 
adds .local or some other internal domain FQDN suffix this ACL will 
fail.


You should have a proper domain name for internal use in both clients 
and configs like this (ie cyberdyne.local is a valid FQDN).



acl lan-intranet dst 192.168.100.222
http_access allow intranet
acl block_websites dstdomain .facebook.com .myspace.com .twitter.com
.hulu.com


same wrap problem for this one.


http_access deny block_websites
http_access allow manager localhost
http_access deny manager
http_access allow purge localhost
http_access deny purge
http_access deny !Safe_ports
http_access deny CONNECT !SSL_ports
http_access allow localnet
http_access allow localhost
http_access allow all


Er. not good, for two reasons.

 1) all means the entire Internet.

 2) this sits before any proxy_auth ACLs are tested (dont see one below 
either). Which means your auth will never happen.


Exactly what access control policies is this config meant to be 
enforcing?





icp_access allow localnet
icp_access deny all
http_port 3128
hierarchy_stoplist cgi-bin ?
access_log /var/log/squid/access.log squid
 debug_options ALL,0,1,34,78


Your Squid version does not accept config lines indented with 
whitespace like that.
The debug_options directive takes a series of number *pairs*  as in:  
section,level section,level section,level

 eg debug_options ALL,0 1,?? 34,?? 78,??

level 1-6 cover most useful debug info when you need a details action 
report.




  TAG: log_fqdn on


That is a piece of documentation. Check that it is not actually in your 
file.



refresh_pattern ^ftp:   144020% 10080
refresh_pattern ^gopher:14400%  1440
refresh_pattern -i (/cgi-bin/|\?) 0 0%  0
refresh_pattern (Release|Packages(.gz)*)$   0   20% 2880
refresh_pattern .   0   20% 4320
acl shoutcast rep_header X-HTTP09-First-Line ^ICY.[0-9]
upgrade_http0.9 deny shoutcast
acl apache rep_header Server ^Apache
broken_vary_encoding allow apache
extension_methods REPORT MERGE MKACTIVITY CHECKOUT
visible_hostname Squid
dns_defnames on
  TAG: dns_nameservers


same as above.


hosts_file /etc/hosts
coredump_dir /var/spool/squid




Amos