Re: [squid-users] peek-and-splice on Centos7 and squid4

2016-10-13 Thread Eliezer Croitoru
May I ask if you are Intercepting the connections or in your setup you 
define/configure in the browserclient the proxy settings?

Eliezer

Eliezer Croitoru
Linux System Administrator
Mobile+WhatsApp: +972-5-28704261
Email: elie...@ngtech.co.il
On Tue, Oct 11, 2016 at 08:10 PM, - -  wrote:
Dear all,

currently I try to configure peek-and-splice on Centos7 and squid4. I have a
running config for Centos6.6 and squid 3.5.18.

No matter what I try i can't get squid4 to splice certain sites and to
bump/terminate the rest. My config is as follows:

acl sni_exclusions ssl::server_name .google.com
acl sni_exclusions ssl::server_name .google.de

acl tcp_level at_step SslBump1
acl client_hello_peeked at_step SslBump2
ssl_bump peek tcp_level all
ssl_bump splice client_hello_peeked sni_exclusions
ssl_bump bump all

if I replace the ssl_bump bump all with ssl_bump terminate all, all sites are
terminated, if I do a ssl_bump splice all, all https traffic is going through.

the log when a device connects to an allowed site looks is below, if I accept
the self generated certificate access the webpage is allowed. If i do the same
with a site not allowed i'll get redirected to the deny_info page after
accepting the certificate. So everything working as desired besides the
certificate warning for "spliced" websites. I'm using the squid4 build from
http://wiki.squid-cache.org/KnowledgeBase/CentOS#Squid_Beta_release 
(http://wiki.squid-cache.org/KnowledgeBase/CentOS#Squid_Beta_release).

Thanks in advance for any hint,
Alex

squid version:
squid -v
Squid Cache: Version 4.0.12
Service Name: squid
configure options:  '--build=x86_64-redhat-linux-gnu'
'--host=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--sharedstatedir=/var/lib'
'--mandir=/usr/share/man' '--infodir=/usr/share/info' '--exec_prefix=/usr'
'--libexecdir=/usr/lib64/squid' '--localstatedir=/var'
'--datadir=/usr/share/squid' '--sysconfdir=/etc/squid'
'--with-logdir=$(localstatedir)/log/squid'
'--with-pidfile=$(localstatedir)/run/squid.pid' '--disable-dependency-tracking'
'--enable-follow-x-forwarded-for' '--enable-auth'
'--enable-auth-basic=DB,LDAP,NCSA,NIS,PAM,POP3,RADIUS,SASL,SMB,getpwnam,fake'
'--enable-auth-ntlm=fake' '--enable-auth-digest=file,LDAP,eDirectory'
'--enable-auth-negotiate=kerberos,wrapper'
'--enable-external-acl-helpers=wbinfo_group,kerberos_ldap_group,LDAP_group,delayer,file_userip,SQL_session,unix_group,session,time_quota'
'--enable-cache-digests' '--enable-cachemgr-hostname=localhost'
'--enable-delay-pools' '--enable-epoll' '--enable-icap-client'
'--enable-ident-lookups' '--enable-linux-netfilter'
'--enable-removal-policies=heap,lru' '--enable-snmp'
'--enable-storeio=aufs,diskd,ufs,rock' '--enable-wccpv2' '--enable-esi'
'--enable-security-cert-generators' '--enable-security-cert-validators'
'--enable-icmp' '--with-aio' '--with-default-user=squid'
'--with-filedescriptors=16384' '--with-dl' '--with-openssl' '--with-pthreads'
'--with-included-ltdl' '--disable-arch-native' '--enable-ecap'
'--without-nettle' 'build_alias=x86_64-redhat-linux-gnu'
'host_alias=x86_64-redhat-linux-gnu' 'CFLAGS=-O2 -g -pipe -Wall
-Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
--param=ssp-buffer-size=4 -grecord-gcc-switches   -m64 -mtune=generic'
'LDFLAGS=-Wl,-z,relro ' 'CXXFLAGS=-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2
-fexceptions -fstack-protector-strong --param=ssp-buffer-size=4
-grecord-gcc-switches   -m64 -mtune=generic -fPIC'
'PKG_CONFIG_PATH=:/usr/lib64/pkgconfig:/usr/share/pkgconfig'
--enable-ltdl-convenience

cache.log:
2016/10/11 16:54:57.126 kid1| 33,5| client_side.cc(1367) parseHttpRequest:
Prepare absolute URL from intercept
2016/10/11 16:54:57.126 kid1| 33,5| client_side.cc(2150) clientParseRequests:
local=216.58.211.3:443 remote=10.248.0.8:59837 FD 25 flags=33: done parsing a
request
2016/10/11 16:54:57.126 kid1| 33,3| Pipeline.cc(24) add: Pipeline 0x2b008e0 add
request 1 0x2b06280*3
2016/10/11 16:54:57.126 kid1| 33,5| Http1Server.cc(181) buildHttpRequest:
normalize 1 Host header using 216.58.211.3:443
2016/10/11 16:54:57.126 kid1| 33,3| client_side.cc(643) clientSetKeepaliveFlag:
http_ver = HTTP/1.1
2016/10/11 16:54:57.126 kid1| 33,3| client_side.cc(644) clientSetKeepaliveFlag:
method = CONNECT
2016/10/11 16:54:57.126 kid1| 33,3| http/Stream.h(139) mayUseConnection: This
0x2b06280 marked 1
2016/10/11 16:54:57.127 kid1| 33,3| client_side.cc(2163) clientParseRequests:
Not parsing new requests, as this request may need the connection
2016/10/11 16:54:57.127 kid1| 33,5| client_side.cc(3113) switchToHttps:
converting local=216.58.211.3:443 remote=10.248.0.8:59837 FD 25 flags=33 to SSL
2016/10/11 16:54:57.127 kid1| 33,4| ServerBump.cc(27) ServerBump: will peek at
216.58.211.3:443
2016/10/11 16:54:57.127 kid1| 33,5| AsyncCall.cc(26) AsyncCall: The A

Re: [squid-users] peek-and-splice on Centos7 and squid4

2016-10-11 Thread Alex Rousskov
On 10/11/2016 11:09 AM, - - wrote:

> currently I try to configure peek-and-splice on Centos7 and squid4. I have a
> running config for Centos6.6 and squid 3.5.18.

It might be useful to confirm that v4.0 does not work on Centos6.6
either (so that there is only one variable -- the Squid version).


> No matter what I try i can't get squid4 to splice certain sites and to
> bump/terminate the rest. My config is as follows:
> 
> acl sni_exclusions ssl::server_name .google.com
> acl sni_exclusions ssl::server_name .google.de
> 
> acl tcp_level at_step SslBump1
> acl client_hello_peeked at_step SslBump2
> ssl_bump peek tcp_level all
> ssl_bump splice client_hello_peeked sni_exclusions
> ssl_bump bump all
> 
> if I replace the ssl_bump bump all with ssl_bump terminate all, all sites are
> terminated, if I do a ssl_bump splice all, all https traffic is going through.

Which implies that your splice rule never matches or the match is
ignored for some reason.


> if I accept
> the self generated certificate access the webpage is allowed. If i do the same
> with a site not allowed i'll get redirected to the deny_info page after
> accepting the certificate.

This is consistent with the above theory. The logs you have posted do
not contain ACL evaluation and post-evaluation details so it is
difficult to say why splice does not work. Please post more related
lines from an ALL,9 log. For example, something like the following might
work:

$ egrep -200 -i 'acl|google|-|bump|sni' cache.log

Compress the results if needed.

Alex.

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users