<div dir="ltr"><div><div><div>Thanks for your reply Alex,<br><br></div>I understood your considerations. Maybe, I really didn't understand very well how the SslBump works, the differences between peek and splice and steps SslBump1, 2 and 3.<br><pre></pre>I'm searching and studing about this last two days, and I need to undertand better about this questions.<br><br></div>There's a way to join ssl_bump + a simple acl? Basicly, I would like to permit access to some sites, like facebbok, linkedin, for example. during a period of day time, for example:<br><br>acl after_work time MTWHFAS 18:00-21:00<br>ssl_bump terminate deny_https_sites !after_work<br><br></div>Thanks,<br><div><br><br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-10-29 20:35 GMT-02:00 Alex Rousskov <span dir="ltr"><<a href="mailto:rousskov@measurement-factory.com" target="_blank">rousskov@measurement-factory.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On 10/29/2015 04:09 PM, Rodrigo de Lima Silva wrote:<br>
<br>
> I've been configured Squid version 3.5.9 and transparent proxy. To do<br>
> this. I used the "peek and splice" feature to works with https protocol<br>
> in transparent mode. It's works fine.<br>
><br>
> There is a "acl" to block some sites, like <a href="http://facebook.com" rel="noreferrer" target="_blank">facebook.com</a><br>
</span>> <<a href="http://facebook.com" rel="noreferrer" target="_blank">http://facebook.com</a>>, <a href="http://linkedin.com" rel="noreferrer" target="_blank">linkedin.com</a> <<a href="http://linkedin.com" rel="noreferrer" target="_blank">http://linkedin.com</a>>, etc... It's<br>
<span class="">> works fine too.<br>
><br>
> acl deny_https_sites ssl::server_name_regex "/etc/squid/https_url.txt"<br>
> ssl_bump terminate deny_https_sites<br>
> ssl_bump peek all<br>
> ssl_bump splice all<br>
<br>
<br>
</span>The above is kind of wrong because it may terminate before learning<br>
enough about the connection. You should terminate after peeking:<br>
<br>
acl ...<br>
<br>
ssl_bump peek all<br>
ssl_bump terminate deny_https_sites<br>
ssl_bump splice all<br>
<br>
Peeking feeds your deny_https_sites ACL with information. Without<br>
peeking, that ACL may only have IP addresses to work with (especially in<br>
an interception environment).<br>
<span class=""><br>
<br>
> But, now, I need to do an rule to permit access for specific users, or<br>
> ip address. But, I don't know if it's possible with ssl_bump. I tried<br>
> somethink like:<br>
><br>
> ssl_bump terminate deny_https_sites !permited_ips<br>
><br>
> or<br>
><br>
> ssl_bump peek deny_https_sites permited_ips<br>
><br>
><br>
> There is one way to do this?<br>
<br>
<br>
</span>The first variant is theoretically correct, but I recommend avoiding<br>
negation in ACLs: An ACL result is not a boolean "match" or "mismatch".<br>
It is actually closer to "match", "mismatch", "do not know", or "error".<br>
Negating four values correctly is difficult, and Squid itself has had<br>
many bugs in that area.<br>
<br>
<br>
If you can truly identify "specific users" by IP, then do that first (no<br>
need to peek):<br>
<br>
ssl_bump splice permited_ips<br>
ssl_bump peek all<br>
ssl_bump terminate deny_https_sites<br>
ssl_bump splice all<br>
<br>
<br>
If your actual "specific user" ACL needs host name information, then let<br>
Squid peek first:<br>
<br>
ssl_bump peek all<br>
ssl_bump splice specific_users<br>
ssl_bump terminate deny_https_sites<br>
ssl_bump splice all<br>
<br>
<br>
Your questions indicate that you may not understand how Squid evaluates<br>
ACL rules. Proceed with caution and try reading a guide book or a good<br>
tutorial. The basic single-rule evaluation algorithm is not specific to<br>
SslBump (although multiple ssl_bump directives add more complexity).<br>
<br>
<br>
Good luck,<br>
<br>
Alex.<br>
<br>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr">Rodrigo Lima - rodrigodlima[at]gmail[dot]com<br></div></div>
</div>