<div dir="ltr"><div class="gmail_default" style="font-family:verdana,sans-serif">I'm trying to setup squid for my wifi which mainly for cell phones and tv box with ssl-bump for the sake of bandwidth saving and my kids protection. Is it posible for squid to directly inject root CA as per request by applications? As i found hardly to setup my root ca to cellphone apps. I had tried install using user credentiall setup but its still failed and impossible for me to reflash the android os just to install the CA cert into the trusted credentialls table. I had try ssl_bump option combination with no luck, peek and bump produce alot of handshake errors. Here's my squid.conf, just guide me to the right way.<br></div><div class="gmail_default" style="font-family:verdana,sans-serif"><br></div><div class="gmail_default" style="font-family:verdana,sans-serif">###################################################<br># Recommended minimum configuration:<br>#<br><br># Example rule allowing access from your local networks.<br># Adapt to list your (internal) IP networks from where browsing<br># should be allowed<br>acl localnet src <a href="http://10.0.0.0/8">10.0.0.0/8</a>      # RFC1918 possible internal network<br>acl localnet src <a href="http://172.16.0.0/12">172.16.0.0/12</a>    # RFC1918 possible internal network<br>acl localnet src <a href="http://192.168.0.0/16">192.168.0.0/16</a>  # RFC1918 possible internal network<br>acl localnet src fc00::/7       # RFC 4193 local private network range<br>acl localnet src fe80::/10      # RFC 4291 link-local (directly plugged) machines<br><br>acl SSL_ports port 443<br>acl Safe_ports port 80          # http<br>acl Safe_ports port 21          # ftp<br>acl Safe_ports port 443          # https<br>acl Safe_ports port 70         # gopher<br>acl Safe_ports port 210               # wais<br>acl Safe_ports port 1025-65535  # unregistered ports<br>acl Safe_ports port 280           # http-mgmt<br>acl Safe_ports port 488            # gss-http<br>acl Safe_ports port 591             # filemaker<br>acl Safe_ports port 777            # multiling http<br>acl CONNECT method CONNECT<br><br>#<br># Recommended minimum Access Permission configuration:<br>#<br># Deny requests to certain unsafe ports<br>http_access deny !Safe_ports<br><br># Deny CONNECT to other than secure SSL ports<br>http_access deny CONNECT !SSL_ports<br><br># Only allow cachemgr access from localhost<br>http_access allow localhost manager<br>http_access deny manager<br><br># We strongly recommend the following be uncommented to protect innocent<br># web applications running on the proxy server who think the only<br># one who can access services on "localhost" is a local user<br>#http_access deny to_localhost<br><br>#<br># INSERT YOUR OWN RULE(S) HERE TO ALLOW ACCESS FROM YOUR CLIENTS<br>#<br><br># Example rule allowing access from your local networks.<br># Adapt localnet in the ACL section to list your (internal) IP networks<br># from where browsing should be allowed<br>http_access allow localnet<br>http_access allow localhost<br><br># And finally deny all other access to this proxy<br>http_access deny all<br><br># Squid normally listens to port 3128<br>#http_port 3127 intercept<br>https_port <a href="http://10.0.1.2:3127">10.0.1.2:3127</a> intercept ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid/ssl_cert/myca.pem dhparams=/etc/squid/ssl_cert/dhparam.pem<br><br>#############################################################<br># tproxy setting<br># ausearch -c 'squid' --raw | audit2allow -M my-squid<br># semodule -i my-squid.pp<br>#http_port <a href="http://10.0.1.2:3128">10.0.1.2:3128</a> ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid/ssl_cert/myca.pem version=1 options=NO_SSLv2,NO_SSLv3,SINGLE_ECDH_USE<br>http_port <a href="http://10.0.1.2:3128">10.0.1.2:3128</a> ssl-bump generate-host-certificates=on dynamic_cert_mem_cache_size=4MB cert=/etc/squid/ssl_cert/myca.pem dhparams=/etc/squid/ssl_cert/dhparam.pem<br><br># Uncomment and adjust the following to add a disk cache directory.<br>#cache_dir ufs /var/spool/squid 100 16 256<br>cache_dir aufs /var/spool/squid 5000 100 256<br><br># Leave coredumps in the first cache dir<br>coredump_dir /var/spool/squid<br><br>cache_mem 8 MB<br>maximum_object_size_in_memory 32 KB<br>memory_replacement_policy heap GDSF<br>cache_replacement_policy heap LFUDA<br>maximum_object_size 128000 KB<br>cache_swap_low 95<br>cache_swap_high 99<br>strip_query_terms off<br><br># semanage fcontext -a -t FILE_TYPE 'index.txt'<br># #where FILE_TYPE is one of the following: NetworkManager_tmp_t, abrt_helper_exec<br># # Then execute:<br>#restorecon -vr 'index.txt'<br>sslcrtd_program /usr/lib64/squid/ssl_crtd -s /var/lib/ssl_db -M 4MB<br><br>sslproxy_foreign_intermediate_certs /etc/squid/ssl_cert/myca.pem<br>#sslproxy_options NO_SSLv2,NO_SSLv3,SINGLE_DH_USE<br>sslproxy_cafile /etc/squid/ssl_cert/myca.pem<br>sslproxy_cipher EECDH+ECDSA+AESGCM:E$<br><br>acl step1 at_step sslbump1<br>acl step2 at_step sslbump2<br>acl step3 at_step sslbump3<br><br>ssl_bump stare step1<br>ssl_bump peek step2<br>ssl_bump bump step3<br><br># When a peek rule matches during step1, Squid proceeds to step2 where it parses the TLS Client Hello and extracts SNI <br># (if any). When a peek rule matches during step 2, Squid proceeds to step3 where it parses the TLS Server Hello <br># and extracts server certificate while preserving the possibility of splicing the client and server connections; <br># peeking at the server certificate usually precludes future bumping (see Limitations).<br>#ssl_bump peek all<br><br># When a stare rule matches during step1, Squid proceeds to step2 where it parses the TLS Client Hello and extracts SNI <br># (if any). When a stare rule matches during step2, Squid proceeds to step3 where it parses the TLS Server Hello and extracts <br># server certificate while preserving the possibility of bumping the client and server connections; staring at the server <br># certificate usually precludes future splicing (see Limitations).<br>#ssl_bump stare all<br><br># Become a TCP tunnel without decoding the connection. The client and the server exchange data as if there is no proxy in <br># between. Step 1, 2 and sometime 3<br>#ssl_bump splice all<br><br># Establish a TLS connection with the server (using client SNI, if any) and establish a TLS connection with the client <br># (using a mimicked server certificate). However, this is not what actually happens right now if a bump rule matches during <br># step1.<br>#ssl_bump bump all<br><br># Close client and server connections.<br>#ssl_bump terminate all<br><br>acl ARCHIEVES url_regex -i \.(rpm|cab|deb|exe|msi|msu|zip|tar|xz|bz|bz2|lzma|gz|tgz|rar|bin|7z|doc?|xls?|ppt?|pdf|nth|psd|sis)*<br>acl PICS url_regex -i \.(gif|png|jp?g|ico|bmp|tiff?)*<br>acl MOVIES url_regex -i \.(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd|ism?)*<br>acl FILES url_regex -i \.(html|htm|css|js)*<br>acl IDXS url_regex -i \.index.(html|htm)*<br>acl GV url_regex -i \.googlevideo\.com*<br><br>#never_direct allow ARCHIEVES<br>#never_direct allow PICS<br>#never_direct allow MOVIES<br>#never_direct allow FILES<br>#never_direct allow IDXS<br><br>cache allow ARCHIEVES<br>cache allow PICS<br>cache allow MOVIES<br>cache allow FILES<br>cache allow IDXS<br>cache allow GV<br><br>#never_direct deny alldst<br>#always_direct allow alldst<br><br>request_header_access From deny all<br>request_header_access Server deny all<br>request_header_access WWW-Authenticate deny all<br>request_header_access Link deny all<br>request_header_access Cache-Control deny all<br>request_header_access Proxy-Connection deny all<br>request_header_access X-Cache deny all<br>request_header_access X-Cache-Lookup deny all<br>request_header_access Via deny all<br>request_header_access X-Forwarded-For deny all<br>request_header_access Pragma deny all<br>request_header_access Keep-Alive deny all<br><br>refresh_pattern ^ftp:       1440    20% 10080<br>refresh_pattern ^gopher:    1440    0%  1440<br>refresh_pattern -i (/cgi-bin/|\?) 0 0%  0<br>refresh_pattern (Release|Packages(.gz)*)*      0       20%     2880<br>refresh_pattern -i \.(gif|png|jp?g|ico|bmp|tiff?)* 10080 95% 43200<br>refresh_pattern -i \.(rpm|cab|deb|exe|msi|msu|zip|tar|xz|bz|bz2|lzma|gz|tgz|rar|bin|7z|doc?|xls?|ppt?|pdf|nth|psd|sis)* 10080 90% 43200<br>refresh_pattern -i \.(avi|iso|wav|mid|mp?|mpeg|mov|3gp|wm?|swf|flv|x-flv|axd)* 43200 95% 432000<br>refresh_pattern -i \.(html|htm|css|js)* 1440 75% 40320<br>refresh_pattern -i \.index.(html|htm)* 0 75% 10080<br>refresh_pattern -i (/cgi-bin/|\?) 0 0% 0<br>refresh_pattern -i \.googlevideo\.com* 43200 95% 432000<br>refresh_pattern . 1440 90% 10080<br><br>quick_abort_min 0 KB<br>quick_abort_max 0 KB<br>quick_abort_pct 100<br>store_avg_object_size 13 KB<br><br>dns_nameservers 10.0.1.2 192.168.19.2<br>visible_hostname <a href="http://ws1.ebedsat.net">ws1.ebedsat.net</a><br>shutdown_lifetime 3 second<br>via off<br>forwarded_for off<br><br>logformat logaccess [%{%d/%b/%Y %H:%M:%S}tl] %>a %Ss/%03>Hs %<st %rm %ru %un %Sh/%<A %mt<br>access_log daemon:/var/log/squid/access.log logaccess<br><br>#<br># Add any of your own refresh_pattern entries above these.<br>#<br>#refresh_pattern ^ftp:            1440    20%     10080<br>#refresh_pattern ^gopher:        1440    0%      1440<br>#refresh_pattern -i (/cgi-bin/|\?) 0      0%      0<br>#refresh_pattern .           0       20%     4320</div></div>